From 0216585a33fc93cdcac9ed39f29c08a5a0188cde Mon Sep 17 00:00:00 2001 From: dummy Date: Wed, 7 Feb 2018 16:20:02 -0500 Subject: [PATCH] customised the deus color scheme for vim --- .vimrc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index c53a671..eaa9802 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,4 @@ -filetype plugin on +filetype plugin indent on syntax on colorscheme deus @@ -21,6 +21,21 @@ set autoindent autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif +" autocmd to highlight current line in one window only +augroup CursorLine + au! + au VimEnter,WinEnter,BufWinEnter * setlocal cursorline + au WinLeave * setlocal nocursorline +augroup END + +" change cursor when changing to/from insert mode +" NOTE: only for xfce terminal +if has("autocmd") + au InsertEnter * silent execute "!sed -i.bak -e 's/TERMINAL_CURSOR_SHAPE_BLOCK/TERMINAL_CURSOR_SHAPE_UNDERLINE/' ~/.config/xfce4/terminal/terminalrc" + au InsertLeave * silent execute "!sed -i.bak -e 's/TERMINAL_CURSOR_SHAPE_UNDERLINE/TERMINAL_CURSOR_SHAPE_BLOCK/' ~/.config/xfce4/terminal/terminalrc" + au VimLeave * silent execute "!sed -i.bak -e 's/TERMINAL_CURSOR_SHAPE_UNDERLINE/TERMINAL_CURSOR_SHAPE_BLOCK/' ~/.config/xfce4/terminal/terminalrc" +endif + " filename auto-completion set wildmode=longest,list,full set wildmenu @@ -34,6 +49,10 @@ set numberwidth=3 set cpoptions+=n " use gutter for wrapped lines highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE +" pathogen plugin +" https://github.com/tpope/vim-pathogen +execute pathogen#infect() + " airline plugin stuffs set laststatus=2 let g:airline#extensions#tabline#enabled = 1 @@ -55,7 +74,7 @@ nnoremap nnoremap nnoremap nnoremap -map :make +map :Make map :ccl " Automatically open, but do not go to (if there are errors) the quickfix / @@ -66,8 +85,12 @@ map :ccl " Note: Normally, :cwindow jumps to the quickfix window if the command opens it " (but not if it's already open). However, as part of the autocmd, this doesn't " seem to happen. -autocmd QuickFixCmdPost [^l]* nested cwindow -autocmd QuickFixCmdPost l* nested lwindow +"autocmd QuickFixCmdPost [^l]* nested copen +"autocmd QuickFixCmdPost l* nested lwindow + +autocmd BufReadPost quickfix nnoremap r :Copen +autocmd BufReadPost quickfix nnoremap R :CopenG +autocmd BufReadPost quickfix nnoremap g :cf " fix keycodes when running inside tmux " http://tmux-users.narkive.com/M9tIqoa0/c-pageup-and-c-pagedown-seems-not-to-work-in-tmux