Browse Source

zshenv

imac
Juni Kim 2 years ago
parent
commit
ea9623ead4
  1. 2
      after/plugin/barbar.lua
  2. 1
      lua/junikim/options.lua
  3. 9
      lua/junikim/remap.lua
  4. 2
      lua/junikim/theme.lua

2
after/plugin/barbar.lua

@ -62,7 +62,7 @@ end
-- :BufferCloseBuffersLeft -- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight -- :BufferCloseBuffersRight
-- Magic buffer-picking mode -- Magic buffer-picking mode
map('n', '<C-P>', '<Cmd>BufferPick<CR>', opts)
-- map('n', '<C-P>', '<Cmd>BufferPick<CR>', opts)
-- Sort automatically by... -- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts) map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts) map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)

1
lua/junikim/options.lua

@ -11,6 +11,7 @@ vim.opt.autoindent = true
vim.opt.textwidth = 80 vim.opt.textwidth = 80
vim.opt.colorcolumn = "80" vim.opt.colorcolumn = "80"
vim.opt.list = true vim.opt.list = true
vim.opt.wrap = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true vim.opt.undofile = true

9
lua/junikim/remap.lua

@ -43,9 +43,10 @@ vim.keymap.set("n", "<leader>X", "<cmd>!chmod -x %<CR>", { silent = true })
-- execute file -- execute file
vim.keymap.set("n", "<leader>,", "<cmd>e ~/.config/nvim<CR>");
vim.keymap.set("n", "<leader>r", "<cmd>so ~/.config/nvim/init.lua<CR>")
vim.keymap.set("n", "<leader>e", "<cmd>!%:p<CR>", { silent = true }) vim.keymap.set("n", "<leader>e", "<cmd>!%:p<CR>", { silent = true })
vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>");
vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>"); vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>");
vim.keymap.set("n", "<leader>fmt", function() vim.keymap.set("n", "<leader>fmt", function()
@ -53,13 +54,13 @@ vim.keymap.set("n", "<leader>fmt", function()
end) end)
if os.getenv("TMUX") ~= nil then if os.getenv("TMUX") ~= nil then
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmuxs<CR>")
vim.keymap.set("n", "<C-n>", "<cmd>silent !tmux neww ncmpcpp<CR>")
vim.keymap.set("n", "<C-f>", [[<cmd>silent !tmux neww "zsh -c '. ~/.zshenv; tmuxs'"<CR>]])
vim.keymap.set("n", "<C-y>", [[<cmd>silent !tmux neww ncmpcpp<CR>]])
else else
local function unavailable() local function unavailable()
print("Not in a tmux session") print("Not in a tmux session")
end end
vim.keymap.set("n", "<C-f>", unavailable) vim.keymap.set("n", "<C-f>", unavailable)
vim.keymap.set("n", "<C-n>", unavailable)
vim.keymap.set("n", "<C-y>", unavailable)
end end

2
lua/junikim/theme.lua

@ -3,7 +3,7 @@ local night = 19
local hour = os.date("*t").hour local hour = os.date("*t").hour
print("hour" .. hour) print("hour" .. hour)
local themes = { "catppuccin-latte", "catppuccin-mocha" }
local themes = { "catppuccin-macchiato", "catppuccin-mocha" }
local theme = 1 local theme = 1
if day <= hour and hour < night then if day <= hour and hour < night then

Loading…
Cancel
Save