Browse Source

customised the deus color scheme for vim

master
dummy 9 years ago
parent
commit
0216585a33
  1. 31
      .vimrc

31
.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 <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
map <F5> :make<CR>
map <F5> :Make<CR>
map <F6> :ccl<CR>
" Automatically open, but do not go to (if there are errors) the quickfix /
@ -66,8 +85,12 @@ map <F6> :ccl<CR>
" 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 <buffer> r :Copen<CR>
autocmd BufReadPost quickfix nnoremap <buffer> R :Copen<CR>G
autocmd BufReadPost quickfix nnoremap <buffer> g :cf<CR>
" fix keycodes when running inside tmux
" http://tmux-users.narkive.com/M9tIqoa0/c-pageup-and-c-pagedown-seems-not-to-work-in-tmux

Loading…
Cancel
Save