1
0
Fork 0
mirror of synced 2024-11-16 05:55:35 -05:00
ultimate-vim/my_configs.vim

118 lines
3.1 KiB
VimL
Raw Normal View History

2015-12-25 06:48:01 -05:00
" This is Tiande's Personal settings.
2016-01-16 04:44:19 -05:00
" [禁止] 折行
set wrap " nowrap
2016-01-16 12:12:17 -05:00
" set list " 显示制表符等
2016-01-16 04:44:19 -05:00
" set listchars=tab:>-,trail:-
2015-12-25 06:48:01 -05:00
" solarized 配置,不用的时候可以注释掉
let g:solarized_termcolors=256 " 16 | 256
let g:solarized_italic=0 " 1 | 0
" let g:solarized_bold=0
" let g:solarized_underline=0
2016-05-14 12:34:31 -04:00
set background=light " dark light
2016-05-14 14:35:45 -04:00
:colorscheme solarized "peaksea solarized ir_black mayansmoke
2015-12-25 06:48:01 -05:00
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" 用来 on off Syntastic 的 function
function! SyntasticToggle()
if exists('g:IsSyntasticOn')
if g:IsSyntasticOn == 1
SyntasticToggleMode
let g:IsSyntasticOn = 0
else
SyntasticCheck
let g:IsSyntasticOn = 1
endif
else
let g:IsSyntasticOn = 1
call SyntasticToggle()
endif
endfunction
" map ,,, to off/on Syntastic
map <leader><leader><leader> :call SyntasticToggle()<cr>
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_python_checkers = ['flake8'] " 修改检查器的地方
" A. Configure the python checker to call a Python 3 interpreter rather than Python 2, e.g:
" let g:syntastic_python_python_exec = 'path/to/python3'
" display all of the errors from all of the checkers together
let g:syntastic_aggregate_errors = 1
" mapping move focus to tab* use: ,t1 ,t2 ...
map <leader>t1 :tabnext 1<cr>
map <leader>t2 :tabnext 2<cr>
map <leader>t3 :tabnext 3<cr>
map <leader>t4 :tabnext 4<cr>
map <leader>t5 :tabnext 5<cr>
map <leader>t6 :tabnext 6<cr>
map <leader>t7 :tabnext 7<cr>
map <leader>t8 :tabnext 8<cr>
map <leader>t9 :tabnext 9<cr>
2015-12-30 02:42:30 -05:00
" use tagbar to instead of taglist
let g:tagbar_left = 1
let g:tagbar_width = 30
let g:tagbar_autofocus = 1
2016-05-17 17:35:37 -04:00
let g:tagbar_show_visibility = 1
" let g:tagbar_show_linenumbers = 2
2015-12-30 02:42:30 -05:00
map <leader>tg :TagbarToggle<cr>
2015-12-25 06:48:01 -05:00
" Set line number
set number
" set cursorline and cursorcolumn
set cursorline
2016-01-16 12:07:03 -05:00
" set cursorcolumn
2015-12-25 06:48:01 -05:00
" foldmethod
" set foldmethod=indent " marker
" 禁止光标闪烁
set gcr=a:block-blinkon0
" 禁止显示滚动条
set guioptions-=l
set guioptions-=L
set guioptions-=r
set guioptions-=R
" 禁止显示菜单和工具条
set guioptions-=m
set guioptions-=T
" 删除文件时自动删除文件对应 buffer
let NERDTreeAutoDeleteBuffer=1
" multi_cursor
" Default mapping
let g:multi_cursor_next_key='<C-n>'
let g:multi_cursor_prev_key='<C-p>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
let g:multi_cursor_start_key='<C-n>'
let g:multi_cursor_start_word_key='g<C-n>'
" vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END
2016-04-12 10:34:26 -04:00
" if use gvim then change guifont
if has('gui_running')
set guifont=Lucida_Console:h12
endif
2016-05-11 12:27:27 -04:00
" map $t to <>
vnoremap $t <esc>`>a><esc>`<i<<esc>
inoremap $t <><esc>i
2016-05-11 12:30:03 -04:00