2012-05-30 04:12:10 +08:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2021-02-24 15:25:16 +08:00
|
|
|
" Important:
|
2012-05-30 04:12:10 +08:00
|
|
|
" This requries that you install https://github.com/amix/vimrc !
|
|
|
|
"
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2012-08-25 06:00:53 +08:00
|
|
|
" Disable scrollbars (real hackers don't use scrollbars for navigation!)
|
|
|
|
set guioptions-=r
|
|
|
|
set guioptions-=R
|
|
|
|
set guioptions-=l
|
|
|
|
set guioptions-=L
|
|
|
|
|
2012-05-30 04:12:10 +08:00
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Fast editing and reloading of vimrc configs
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2012-05-31 00:54:47 +08:00
|
|
|
map <leader>e :e! ~/.vim_runtime/my_configs.vim<cr>
|
2012-05-30 04:12:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2021-02-24 15:25:16 +08:00
|
|
|
" => Turn persistent undo on
|
2012-05-30 04:12:10 +08:00
|
|
|
" means that you can undo even when you close a buffer/VIM
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
try
|
2012-05-31 00:54:47 +08:00
|
|
|
set undodir=~/.vim_runtime/temp_dirs/undodir
|
2012-05-30 04:12:10 +08:00
|
|
|
set undofile
|
|
|
|
catch
|
|
|
|
endtry
|
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Command mode related
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" Bash like keys for the command line
|
2021-02-24 15:25:16 +08:00
|
|
|
cnoremap <C-A> <Home>
|
|
|
|
cnoremap <C-E> <End>
|
|
|
|
cnoremap <C-K> <C-U>
|
2012-05-30 04:12:10 +08:00
|
|
|
|
|
|
|
cnoremap <C-P> <Up>
|
|
|
|
cnoremap <C-N> <Down>
|
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => General abbreviations
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2019-11-30 19:54:13 +08:00
|
|
|
iab xdate <C-r>=strftime("%d/%m/%y %H:%M:%S")<cr>
|
2012-05-30 04:12:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Omni complete functions
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
|
|
|
|
|
|
|
|
|
2017-04-01 20:29:02 +08:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Ack searching and cope displaying
|
|
|
|
" requires ack.vim - it's much better than vimgrep/grep
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" Use the the_silver_searcher if possible (much faster than Ack)
|
|
|
|
if executable('ag')
|
|
|
|
let g:ackprg = 'ag --vimgrep --smart-case'
|
|
|
|
endif
|
|
|
|
|
2019-08-22 23:34:32 +08:00
|
|
|
" Make sure that enter is never overriden in the quickfix window
|
|
|
|
autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
|
2017-04-01 20:29:02 +08:00
|
|
|
|
2012-05-30 04:12:10 +08:00
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Helper functions
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2021-02-24 15:25:16 +08:00
|
|
|
|