mirror of
https://github.com/amix/vimrc
synced 2025-07-18 09:35:00 +08:00
merge
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Important:
|
||||
" Important:
|
||||
" This requries that you install https://github.com/amix/vimrc !
|
||||
"
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
@ -30,13 +30,10 @@ map <leader>f :MRU<CR>
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => YankRing
|
||||
" => YankStack
|
||||
""""""""""""""""""""""""""""""
|
||||
if has("win16") || has("win32")
|
||||
" Don't do anything
|
||||
else
|
||||
let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/'
|
||||
endif
|
||||
nmap <c-p> <Plug>yankstack_substitute_older_paste
|
||||
nmap <c-P> <Plug>yankstack_substitute_newer_paste
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
@ -76,8 +73,12 @@ set grepprg=/bin/grep\ -nH
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Nerd Tree
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:NERDTreeWinPos = "right"
|
||||
let NERDTreeShowHidden=0
|
||||
let NERDTreeIgnore = ['\.pyc$', '__pycache__']
|
||||
let g:NERDTreeWinSize=35
|
||||
map <leader>nn :NERDTreeToggle<cr>
|
||||
map <leader>nb :NERDTreeFromBookmark
|
||||
map <leader>nb :NERDTreeFromBookmark<Space>
|
||||
map <leader>nf :NERDTreeFind<cr>
|
||||
|
||||
|
||||
@ -96,9 +97,32 @@ au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => vim-airline config (force color)
|
||||
" => lightline
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:airline_theme="luna"
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'wombat',
|
||||
\ }
|
||||
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'wombat',
|
||||
\ 'active': {
|
||||
\ 'left': [ ['mode', 'paste'],
|
||||
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
|
||||
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
|
||||
\ },
|
||||
\ 'component': {
|
||||
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}',
|
||||
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
|
||||
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
|
||||
\ },
|
||||
\ 'component_visible_condition': {
|
||||
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
||||
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
|
||||
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
|
||||
\ },
|
||||
\ 'separator': { 'left': ' ', 'right': ' ' },
|
||||
\ 'subseparator': { 'left': ' ', 'right': ' ' }
|
||||
\ }
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Vimroom
|
||||
@ -109,7 +133,37 @@ let g:goyo_margin_bottom = 2
|
||||
nnoremap <silent> <leader>z :Goyo<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Vim-go
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:go_fmt_command = "goimports"
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Syntastic (syntax checker)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Python
|
||||
let g:syntastic_python_checkers=['pyflakes']
|
||||
|
||||
" Javascript
|
||||
let g:syntastic_javascript_checkers = ['jshint']
|
||||
|
||||
" Go
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_go_checkers = ['go', 'golint', 'errcheck']
|
||||
|
||||
" Custom CoffeeScript SyntasticCheck
|
||||
func! SyntasticCheckCoffeescript()
|
||||
let l:filename = substitute(expand("%:p"), '\(\w\+\)\.coffee', '.coffee.\1.js', '')
|
||||
execute "tabedit " . l:filename
|
||||
execute "SyntasticCheck"
|
||||
execute "Errors"
|
||||
endfunc
|
||||
nnoremap <silent> <leader>c :call SyntasticCheckCoffeescript()<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Git gutter (Git diff)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:gitgutter_enabled=0
|
||||
nnoremap <silent> <leader>d :GitGutterToggle<cr>
|
||||
|
Reference in New Issue
Block a user