|
|
@ -5,6 +5,11 @@ |
|
|
|
set nocompatible " vi compatibility off |
|
|
|
set nocompatible " vi compatibility off |
|
|
|
scriptencoding utf-8 |
|
|
|
scriptencoding utf-8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"" Vundle |
|
|
|
|
|
|
|
filetype off |
|
|
|
|
|
|
|
set rtp+=~/.vim/bundle/vundle/ |
|
|
|
|
|
|
|
call vundle#rc() |
|
|
|
|
|
|
|
|
|
|
|
"" filetype plugin and syntax |
|
|
|
"" filetype plugin and syntax |
|
|
|
syntax on |
|
|
|
syntax on |
|
|
|
filetype indent plugin on |
|
|
|
filetype indent plugin on |
|
|
@ -46,52 +51,9 @@ set hlsearch |
|
|
|
set incsearch |
|
|
|
set incsearch |
|
|
|
set showmatch |
|
|
|
set showmatch |
|
|
|
|
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" visual style {{{ |
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
"" colorscheme |
|
|
|
|
|
|
|
"colorscheme wombat256mod " set after the bundles at the end of this file! |
|
|
|
|
|
|
|
set background=dark |
|
|
|
|
|
|
|
set t_Co=256 " force more colors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"" highlight the current line and column |
|
|
|
|
|
|
|
set cul |
|
|
|
|
|
|
|
set cuc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"" statusbar |
|
|
|
|
|
|
|
set cmdheight=2 |
|
|
|
|
|
|
|
set laststatus=2 |
|
|
|
|
|
|
|
set showcmd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"" linenumbers |
|
|
|
|
|
|
|
set number |
|
|
|
set number |
|
|
|
set relativenumber |
|
|
|
|
|
|
|
set ruler |
|
|
|
|
|
|
|
"" }}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" general auto commands {{{ |
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" autoremove trailing whitespace |
|
|
|
|
|
|
|
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" salt syntax highlighting |
|
|
|
|
|
|
|
au BufRead,BufNewFile *.sls set filetype=sls |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" arduino syntax highlightning |
|
|
|
|
|
|
|
au BufRead,BufNewFile *.ino set filetype=c |
|
|
|
|
|
|
|
"" }}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" keymaps {{{ |
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let mapleader = "\<Space>" |
|
|
|
let mapleader = "," |
|
|
|
|
|
|
|
|
|
|
|
" some easy ones |
|
|
|
|
|
|
|
nnoremap <Leader>o :CtrlP<CR> |
|
|
|
|
|
|
|
nnoremap <Leader>w :w<CR> |
|
|
|
|
|
|
|
nnoremap <Leader>q :wq<CR> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" jump to visual lines |
|
|
|
" jump to visual lines |
|
|
|
nnoremap j gj |
|
|
|
nnoremap j gj |
|
|
@ -101,19 +63,9 @@ nnoremap k gk |
|
|
|
vnoremap < <gv |
|
|
|
vnoremap < <gv |
|
|
|
vnoremap > >gv |
|
|
|
vnoremap > >gv |
|
|
|
|
|
|
|
|
|
|
|
" replace dollar and acute |
|
|
|
|
|
|
|
nnoremap B ^ |
|
|
|
|
|
|
|
nnoremap E $ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" highlight last inserted text |
|
|
|
|
|
|
|
nnoremap gV `[v`] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" change Y from yy to y$ |
|
|
|
" change Y from yy to y$ |
|
|
|
map Y y$ |
|
|
|
map Y y$ |
|
|
|
|
|
|
|
|
|
|
|
" alternative esc |
|
|
|
|
|
|
|
inoremap jk <esc> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" remove search hl |
|
|
|
" remove search hl |
|
|
|
nnoremap <silent><C-C> :nohl<CR> |
|
|
|
nnoremap <silent><C-C> :nohl<CR> |
|
|
|
|
|
|
|
|
|
|
@ -132,57 +84,31 @@ cmap w!! w !sudo tee % |
|
|
|
cmap ack Ack! |
|
|
|
cmap ack Ack! |
|
|
|
cmap grep grep! |
|
|
|
cmap grep grep! |
|
|
|
|
|
|
|
|
|
|
|
"" }}} |
|
|
|
" Setting up Vundle - the vim plugin bundler |
|
|
|
|
|
|
|
let iCanHazVundle=1 |
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" autoinstall vundle and bundles {{{ |
|
|
|
|
|
|
|
" Credit to: https://github.com/erikzaadi |
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" automatic installation of vundle on fresh deployments |
|
|
|
|
|
|
|
let installed_vundle=0 |
|
|
|
|
|
|
|
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') |
|
|
|
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') |
|
|
|
if !filereadable(vundle_readme) |
|
|
|
if !filereadable(vundle_readme) |
|
|
|
echo "Installing Vundle..." |
|
|
|
echo "Installing Vundle.." |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
silent !mkdir -p ~/.vim/bundle |
|
|
|
silent !mkdir -p ~/.vim/bundle |
|
|
|
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle |
|
|
|
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle |
|
|
|
let installed_vundle=1 |
|
|
|
let iCanHazVundle=0 |
|
|
|
endif |
|
|
|
endif |
|
|
|
set rtp+=~/.vim/bundle/vundle/ |
|
|
|
set rtp+=~/.vim/bundle/vundle/ |
|
|
|
call vundle#rc() |
|
|
|
call vundle#rc() |
|
|
|
|
|
|
|
|
|
|
|
" begin bundles |
|
|
|
|
|
|
|
Bundle 'gmarik/vundle' |
|
|
|
Bundle 'gmarik/vundle' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if iCanHazVundle == 0 |
|
|
|
|
|
|
|
echo "Installing Bundles, please ignore key map error messages" |
|
|
|
|
|
|
|
echo "" |
|
|
|
|
|
|
|
:BundleInstall |
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
Bundle 'myusuf3/numbers.vim' |
|
|
|
Bundle 'myusuf3/numbers.vim' |
|
|
|
Bundle 'tpope/vim-fugitive' |
|
|
|
Bundle 'tpope/vim-fugitive' |
|
|
|
Bundle 'Lokaltog/vim-easymotion' |
|
|
|
Bundle 'Lokaltog/vim-easymotion' |
|
|
|
Bundle 'kien/ctrlp.vim' |
|
|
|
Bundle 'kien/ctrlp.vim' |
|
|
|
Bundle 'scrooloose/nerdtree' |
|
|
|
Bundle 'scrooloose/nerdtree' |
|
|
|
Bundle 'tomtom/tcomment_vim' |
|
|
|
|
|
|
|
Bundle 'vim-scripts/taglist.vim' |
|
|
|
|
|
|
|
Bundle 'saltstack/salt-vim' |
|
|
|
|
|
|
|
Bundle 'vim-scripts/wombat256.vim' |
|
|
|
|
|
|
|
Bundle 'bling/vim-airline' |
|
|
|
|
|
|
|
Bundle 'goldfeld/vim-seek' |
|
|
|
|
|
|
|
Bundle 'davidhalter/jedi-vim' |
|
|
|
|
|
|
|
Bundle 'airblade/vim-gitgutter' |
|
|
|
|
|
|
|
Bundle 'ivyl/vim-bling' |
|
|
|
|
|
|
|
Bundle 'mileszs/ack.vim' |
|
|
|
|
|
|
|
Bundle 'sjl/gundo.vim' |
|
|
|
|
|
|
|
Bundle 'terryma/vim-expand-region' |
|
|
|
|
|
|
|
"Bundle 'Yggdroot/indentLine' " good with my urxvt config: let g:indentLine_color_term = 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if installed_vundle == 1 |
|
|
|
|
|
|
|
:BundleInstall |
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
"" }}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
" bundle options {{{ |
|
|
|
|
|
|
|
"#################################################################### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" NERDTree |
|
|
|
|
|
|
|
nnoremap <silent><leader>f :NERDTreeToggle<Cr> |
|
|
|
nnoremap <silent><leader>f :NERDTreeToggle<Cr> |
|
|
|
let NERDTreeShowBookmarks=1 |
|
|
|
let NERDTreeShowBookmarks=1 |
|
|
|
let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr'] |
|
|
|
let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr'] |
|
|
@ -191,45 +117,29 @@ let NERDTreeQuitOnOpen=1 |
|
|
|
let NERDTreeMouseMode=2 |
|
|
|
let NERDTreeMouseMode=2 |
|
|
|
let NERDTreeShowHidden=1 |
|
|
|
let NERDTreeShowHidden=1 |
|
|
|
let NERDTreeKeepTreeInNewTab=1 |
|
|
|
let NERDTreeKeepTreeInNewTab=1 |
|
|
|
|
|
|
|
Bundle 'tomtom/tcomment_vim' |
|
|
|
" Taglist |
|
|
|
Bundle 'vim-scripts/taglist.vim' |
|
|
|
noremap <silent><leader>t :TlistToggle<Cr> |
|
|
|
noremap <silent><leader>t :TlistToggle<Cr> |
|
|
|
let Tlist_Use_Right_Window=1 |
|
|
|
let Tlist_Use_Right_Window=1 |
|
|
|
let Tlist_GainFocus_On_ToggleOpen = 1 |
|
|
|
let Tlist_GainFocus_On_ToggleOpen = 1 |
|
|
|
|
|
|
|
Bundle 'saltstack/salt-vim' |
|
|
|
" Colorscheme from bundle (needs to come after its Bundle line) |
|
|
|
Bundle 'bling/vim-airline' |
|
|
|
colorscheme wombat256mod |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Airline |
|
|
|
|
|
|
|
let g:airline#extensions#tabline#enabled = 1 |
|
|
|
let g:airline#extensions#tabline#enabled = 1 |
|
|
|
let g:airline_left_sep = '' |
|
|
|
let g:airline_left_sep = '' |
|
|
|
let g:airline_right_sep = '' |
|
|
|
let g:airline_right_sep = '' |
|
|
|
let g:airline#extensions#tabline#fnamecollapse = 0 |
|
|
|
let g:airline#extensions#tabline#fnamecollapse = 0 |
|
|
|
let g:airline_exclude_preview=1 |
|
|
|
let g:airline_exclude_preview=1 |
|
|
|
|
|
|
|
Bundle 'goldfeld/vim-seek' |
|
|
|
" Seek |
|
|
|
|
|
|
|
let g:seek_subst_disable = 1 |
|
|
|
let g:seek_subst_disable = 1 |
|
|
|
let g:seek_enable_jumps = 1 |
|
|
|
let g:seek_enable_jumps = 1 |
|
|
|
let g:seek_enable_jumps_in_diff = 1 |
|
|
|
let g:seek_enable_jumps_in_diff = 1 |
|
|
|
|
|
|
|
Bundle 'davidhalter/jedi-vim' |
|
|
|
" Jedi |
|
|
|
|
|
|
|
let g:jedi#goto_assignments_command = "" |
|
|
|
let g:jedi#goto_assignments_command = "" |
|
|
|
let g:jedi#use_tabs_not_buffers = 0 |
|
|
|
let g:jedi#use_tabs_not_buffers = 0 |
|
|
|
let g:jedi#popup_on_dot = 0 |
|
|
|
let g:jedi#popup_on_dot = 1 |
|
|
|
|
|
|
|
Bundle 'airblade/vim-gitgutter' |
|
|
|
" GitGutter |
|
|
|
|
|
|
|
let g:gitgutter_enabled = 0 |
|
|
|
let g:gitgutter_enabled = 0 |
|
|
|
noremap <silent><leader>g :GitGutterToggle<Cr> |
|
|
|
noremap <silent><leader>g :GitGutterToggle<Cr> |
|
|
|
|
|
|
|
Bundle 'ivyl/vim-bling' |
|
|
|
" crtl-p |
|
|
|
Bundle 'mileszs/ack.vim' |
|
|
|
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f'] |
|
|
|
au BufRead,BufNewFile *.sls set filetype=sls |
|
|
|
let g:ctrlp_use_caching = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Gundo |
|
|
|
|
|
|
|
nnoremap <silent><leader>u :GundoToggle<Cr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" expand-region |
|
|
|
|
|
|
|
vmap v <Plug>(expand_region_expand) |
|
|
|
|
|
|
|
vmap <C-v> <Plug>(expand_region_shrink) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"" }}} |
|
|
|
|
|
|
|