Much stuff
This commit is contained in:
parent
14c895099f
commit
1a95e72d42
1 changed files with 57 additions and 20 deletions
77
vim/.vimrc
77
vim/.vimrc
|
@ -1,14 +1,14 @@
|
|||
set nocompatible
|
||||
filetype off
|
||||
|
||||
" init vundle
|
||||
" --- init vundle
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
" Let Vundle manage Vundle
|
||||
" --- Let Vundle manage Vundle
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
|
||||
" My plugins
|
||||
" --- My plugins
|
||||
Plugin 'scrooloose/nerdtree' " FileBrowser on the left side
|
||||
Plugin 'ervandew/supertab' "Auto completion
|
||||
Plugin 'jeetsukumaran/vim-buffergator' "Easy buffer switching
|
||||
|
@ -18,12 +18,16 @@ Plugin 'MarcWeber/vim-addon-mw-utils' " Dependency for snipmate
|
|||
Plugin 'tomtom/tlib_vim' "Dependency for snipmate
|
||||
Plugin 'garbas/vim-snipmate' "Snippets
|
||||
Plugin 'easymotion/vim-easymotion' "Easy Motion
|
||||
Plugin 'jiangmiao/auto-pairs' "Auto pairs brackets, parenthesis, etc.
|
||||
Plugin 'kana/vim-textobj-user' "User defined text objects
|
||||
Plugin 'kana/vim-textobj-indent' "Indent based text objects
|
||||
Plugin 'benmills/vimux' "Tmux integration
|
||||
|
||||
" End init vundle
|
||||
" --- End init vundle
|
||||
call vundle#end()
|
||||
filetype plugin indent on
|
||||
|
||||
" General configurations
|
||||
" --- General configurations
|
||||
set whichwrap+=<,>,[,]
|
||||
set autoread "auto read file if changed
|
||||
set wildmenu "Command completion
|
||||
|
@ -56,66 +60,99 @@ set tabstop=4
|
|||
set lbr
|
||||
set tw=500
|
||||
set t_Co=256
|
||||
set hidden "Hidden buffers may exist
|
||||
|
||||
syntax enable
|
||||
colorscheme desert
|
||||
|
||||
" Leader commands
|
||||
" --- Own functions
|
||||
function! AddSemicolon()
|
||||
normal m'A;
|
||||
normal `'
|
||||
endfunction
|
||||
|
||||
function! RunCmdVimux()
|
||||
let l:cmd = input("Run: ")
|
||||
if l:cmd !~ '\s\+'
|
||||
call VimuxRunCommand("clear && " . l:cmd)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" --- Bindings
|
||||
let mapleader = ","
|
||||
|
||||
nnoremap <silent> <leader><space> :noh<cr>
|
||||
nnoremap <silent> <leader>c :%s/\s\+$//e<cr>
|
||||
nnoremap <silent> <leader>v :%s/\n\{3,}/\r\r/e<cr>
|
||||
" evil spaces
|
||||
nnoremap <silent> <leader>c m':%s/\s\+$//e<cr>`'
|
||||
" double empty lines
|
||||
nnoremap <silent> <leader>v m':%s/\n\{3,}/\r\r/e<cr>`'
|
||||
" Toggle paste
|
||||
nnoremap <silent> <leader>p :set invpaste paste?<cr>
|
||||
" Quick tabularize
|
||||
nnoremap <leader>a :Tabularize /
|
||||
vnoremap <leader>a :'<,'>Tabularize /
|
||||
nnoremap <leader>w <C-w>v<C-w>l
|
||||
" VimRC
|
||||
nnoremap <leader>oc :e ~/.vimrc<cr>
|
||||
nnoremap <leader>sc :so ~/.vimrc<cr>
|
||||
" Vimux
|
||||
nnoremap <leader>rr :call RunCmdVimux()<cr>
|
||||
nnoremap <leader>rq :call VimuxCloseRunner()<cr>
|
||||
nnoremap <silent> ; :call AddSemicolon()<cr>
|
||||
|
||||
" Don't need a help
|
||||
" --- Don't need a help
|
||||
inoremap <F1> <nop>
|
||||
nnoremap <F1> <nop>
|
||||
vnoremap <F1> <nop>
|
||||
|
||||
" Just a nuisance
|
||||
" --- Just a nuisance
|
||||
nnoremap q: <nop>
|
||||
|
||||
" No moving in insert mode allowed
|
||||
" --- No moving in insert mode allowed
|
||||
ino <down> <Nop>
|
||||
ino <up> <Nop>
|
||||
ino <left> <Nop>
|
||||
ino <right> <Nop>
|
||||
|
||||
" Different use of undo
|
||||
" --- Different use of undo
|
||||
nnoremap U <c-r>
|
||||
|
||||
" We don't need useless whitespace at the of the line
|
||||
" --- We don't need useless whitespace at the of the line
|
||||
highlight WhitespaceEOL ctermbg=Red guibg=Red
|
||||
match WhitespaceEOL /\s\+$/
|
||||
|
||||
" Rice
|
||||
" --- Rice
|
||||
set statusline=%m
|
||||
set statusline+=\ %f
|
||||
set statusline+=%=
|
||||
set statusline+=%l
|
||||
set statusline+=\ %c
|
||||
hi StatusLine cterm=None ctermfg=green ctermbg=none
|
||||
hi Search cterm=NONE
|
||||
hi Search cterm=NONE
|
||||
hi IncSearch cterm=underline ctermbg=none ctermfg=green
|
||||
hi VertSplit cterm=none ctermbg=none ctermfg=blue
|
||||
|
||||
"Supertab
|
||||
" --- Supertab
|
||||
hi Pmenu ctermfg=green ctermbg=black
|
||||
hi PmenuSel ctermfg=white ctermbg=black
|
||||
hi PmenuSbar ctermfg=white ctermbg=black cterm=none
|
||||
let g:SuperTabNoCompleteAfter = ['^',',','\s']
|
||||
|
||||
"NERDTree tabs
|
||||
" --- NERDTree tabs
|
||||
nmap <silent> <leader>e :NERDTreeToggle<CR>
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||
autocmd bufenter * if !exists("b:NERDTreeType") | NERDTreeClose | endif
|
||||
let NERDTreeWinSize = 30
|
||||
let NERDChristmasTree = 0
|
||||
let NERDTreeChDirMode = 2
|
||||
let NERDTreeIgnore=['\~$','\.pyc$','\.swp$']
|
||||
let NERDTreeWinPos="left"
|
||||
|
||||
"EasyMotion
|
||||
" --- EasyMotion
|
||||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(easymotion-tn)
|
||||
|
||||
map n <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
|
||||
" --- Auto pairs
|
||||
|
||||
|
|
Loading…
Reference in a new issue