commit ed8ca4cab59ba53e5d0c746c4dc8cb76f768ce04
parent 9903582247fe247a0cbacd6657f428a5154b5d97
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Tue, 2 Aug 2022 23:09:35 +0530
vim: Use seperate file hyper-red for theme
Tune hyper-red. Resplace distracting yellow with blue when searching
Use useful emacs keybindings for line editing in vim insert mode
Use current working directory when splitting and use new paths when
creating a new window
Diffstat:
4 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
@@ -43,16 +43,30 @@ augroup END
-- hyper-red
-- TODO use lua api
vim.cmd('hi StatusLine ctermbg=white ctermfg=red')
-vim.cmd('hi StatusLineNC ctermbg=white ctermfg=black')
+
+vim.cmd([[
+if &background == "dark"
+ hi StatusLineNC ctermbg=white ctermfg=black
+else
+ hi StatusLineNC ctermbg=black ctermfg=white
+endif
+]])
+
vim.cmd('hi LineNr ctermbg=NONE ctermfg=DarkGray')
vim.cmd('set fillchars=vert:\\│')
vim.cmd('hi VertSplit term=NONE cterm=NONE gui=NONE')
vim.cmd('hi SignColumn ctermbg=NONE guibg=NONE')
vim.cmd('hi Comment ctermfg=DarkGray guifg=DarkGray')
-vim.cmd('hi Statement ctermfg=DarkGray guifg=DarkGray')
-vim.cmd('hi Type ctermfg=DarkGray guifg=DarkGray')
+vim.cmd('hi Statement ctermfg=Blue guifg=Blue')
+vim.cmd('hi Type ctermfg=red guifg=red')
vim.cmd('hi PreProc ctermfg=LightGray guifg=LightGray')
-vim.cmd('hi Constant ctermfg=red guifg=red')
+vim.cmd('hi Constant ctermfg=blue guifg=blue')
vim.cmd('hi Special ctermfg=red guifg=red')
vim.cmd('hi Identifier ctermfg=white guifg=white')
-vim.cmd('hi Visual ctermbg=white ctermfg=black guibg=black guifg=black')
+vim.cmd('hi Visual ctermbg=LightGray ctermfg=DarkGray guibg=LightGray guifg=DarkGray')
+vim.cmd('hi Search ctermbg=Blue ctermfg=Black guibg=Blue guifg=Black')
+vim.cmd('hi Todo ctermbg=NONE ctermfg=Yellow guibg=NONE guifg=Yellow')
+
+-- TODO handle tCo lesss that 16 case
+-- Probably use a autogroup for handling tCo count change
+-- Do it in lua
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
@@ -2,15 +2,15 @@
set -g base-index 1
set escape-time 0
set -g set-titles on
-bind c new-window -c "#{pane_current_path}"
+# bind c new-window
# Status bar
set -g status-position top
set -g status-justify left
set -g status-right "#(tmux-now-playing)"
set -g status-keys vi
-bind v split-window -h
-bind s split-window -v
+bind v split-window -h -c "#{pane_current_path}"
+bind s split-window -v -c "#{pane_current_path}"
# Navigation
set-window-option -g mode-keys vi
diff --git a/.config/vim/hyper-red.vim b/.config/vim/hyper-red.vim
@@ -1,13 +1,13 @@
" Hyper Red
hi StatusLine ctermbg=white ctermfg=red
hi StatusLineNC ctermbg=white ctermfg=black
-hi LineNr ctermbg=NONE ctermfg=DarkGray
+hi LineNr ctermbg=NONE ctermfg=Blue
set fillchars=vert:\│
hi VertSplit term=NONE cterm=NONE gui=NONE
hi SignColumn ctermbg=NONE guibg=NONE
-hi Comment ctermfg=DarkGray guifg=DarkGray
-hi Statement ctermfg=DarkGray guifg=DarkGray
-hi Type ctermfg=DarkGray guifg=DarkGray
+hi Comment ctermfg=Blue guifg=Blue
+hi Statement ctermfg=Blue guifg=Blue
+hi Type ctermfg=Blue guifg=Blue
hi PreProc ctermfg=LightGray guifg=LightGray
hi Constant ctermfg=red guifg=red
hi Special ctermfg=red guifg=red
diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim
@@ -21,6 +21,9 @@ nnoremap <leader>vv :vsplit<enter>
" Accessible completions
inoremap <c-f> <c-x><c-f>
inoremap <c-l> <c-x><c-l>
+" Emacs line navigation in insert mode
+inoremap <c-a> <c-o>0
+inoremap <c-e> <c-o>A
" Behave vim
nnoremap Y y$