|
|
|
|
@ -1,7 +1,36 @@
|
|
|
|
|
filetype plugin indent on |
|
|
|
|
" |
|
|
|
|
" Begin Vundle config |
|
|
|
|
" https://github.com/VundleVim/Vundle.vim |
|
|
|
|
" |
|
|
|
|
set nocompatible |
|
|
|
|
filetype off |
|
|
|
|
|
|
|
|
|
" set the runtime path to include Vundle and initialize |
|
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim |
|
|
|
|
call vundle#begin() |
|
|
|
|
" alternatively, pass a path where Vundle should install plugins |
|
|
|
|
"call vundle#begin('~/some/path/here') |
|
|
|
|
|
|
|
|
|
" let Vundle manage Vundle, required |
|
|
|
|
Plugin 'VundleVim/Vundle.vim' |
|
|
|
|
" plugin for running make asynchronously |
|
|
|
|
Plugin 'https://github.com/skywind3000/asyncrun.vim.git' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" All of your Plugins must be added before the following line |
|
|
|
|
call vundle#end() " required |
|
|
|
|
filetype plugin indent on " required |
|
|
|
|
|
|
|
|
|
" |
|
|
|
|
" End Vundle config |
|
|
|
|
" |
|
|
|
|
|
|
|
|
|
"filetype plugin indent on |
|
|
|
|
syntax on |
|
|
|
|
colorscheme deus |
|
|
|
|
|
|
|
|
|
set hlsearch |
|
|
|
|
|
|
|
|
|
" don't clutter directories with backup files |
|
|
|
|
set nobackup |
|
|
|
|
set nowritebackup |
|
|
|
|
@ -12,29 +41,9 @@ set clipboard=unnamedplus
|
|
|
|
|
" folding |
|
|
|
|
set foldmethod=syntax |
|
|
|
|
set foldnestmax=1 |
|
|
|
|
set foldlevelstart=0 |
|
|
|
|
set foldlevelstart=20 |
|
|
|
|
set foldcolumn=2 |
|
|
|
|
set autoindent |
|
|
|
|
" Don't screw up folds when inserting text that might affect them, until |
|
|
|
|
" " leaving insert mode. Foldmethod is local to the window. Protect against |
|
|
|
|
" " screwing up folding when switching between windows. |
|
|
|
|
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_IBEAM/' ~/.config/xfce4/terminal/terminalrc" |
|
|
|
|
au InsertLeave * silent execute "!sed -i.bak -e 's/TERMINAL_CURSOR_SHAPE_IBEAM/TERMINAL_CURSOR_SHAPE_BLOCK/' ~/.config/xfce4/terminal/terminalrc" |
|
|
|
|
au VimLeave * silent execute "!sed -i.bak -e 's/TERMINAL_CURSOR_SHAPE_IBEAM/TERMINAL_CURSOR_SHAPE_BLOCK/' ~/.config/xfce4/terminal/terminalrc" |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
" filename auto-completion |
|
|
|
|
set wildmode=longest,list,full |
|
|
|
|
@ -49,10 +58,6 @@ 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 |
|
|
|
|
@ -74,23 +79,38 @@ 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> |
|
|
|
|
map <F2> :cn<CR> |
|
|
|
|
|
|
|
|
|
" Automatically open, but do not go to (if there are errors) the quickfix / |
|
|
|
|
" location list window, or close it when is has become empty. |
|
|
|
|
" |
|
|
|
|
" Note: Must allow nesting of autocmds to enable any customizations for quickfix |
|
|
|
|
" buffers. |
|
|
|
|
" 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 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> |
|
|
|
|
map <F5> :AsyncRun -save=2 make<CR> |
|
|
|
|
|
|
|
|
|
augroup vimrc |
|
|
|
|
" remove all vimrc autocommands |
|
|
|
|
autocmd! |
|
|
|
|
autocmd QuickFixCmdPost * copen 8 |
|
|
|
|
|
|
|
|
|
" Don't screw up folds when inserting text that might affect them, until |
|
|
|
|
" " leaving insert mode. Foldmethod is local to the window. Protect against |
|
|
|
|
" " screwing up folding when switching between windows. |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
" save folds/cursor positions of buffers |
|
|
|
|
autocmd BufWinLeave *.* mkview |
|
|
|
|
autocmd BufWinEnter *.* silent loadview |
|
|
|
|
|
|
|
|
|
" Automatically open, but do not go to (if there are errors) the quickfix / |
|
|
|
|
" location list window, or close it when is has become empty. |
|
|
|
|
" |
|
|
|
|
" Note: Must allow nesting of autocmds to enable any customizations for quickfix |
|
|
|
|
" buffers. |
|
|
|
|
" 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 |
|
|
|
|
augroup END |
|
|
|
|
|
|
|
|
|
" fix keycodes when running inside tmux |
|
|
|
|
" http://tmux-users.narkive.com/M9tIqoa0/c-pageup-and-c-pagedown-seems-not-to-work-in-tmux |
|
|
|
|
|