2012-05-29 20:12:10 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2016-05-14 12:22:57 +00:00
|
|
|
" Important:
|
2019-11-16 16:00:14 +00:00
|
|
|
" This requires that you install https://github.com/amix/vimrc !
|
2012-05-29 20:12:10 +00:00
|
|
|
"
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
|
|
|
2023-08-20 14:36:15 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Enable native vim packages as described in the README
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
set packpath+=~/.vim_runtime
|
|
|
|
|
|
|
|
|
2012-05-29 20:12:10 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Load pathogen paths
|
|
|
|
""""""""""""""""""""""""""""""
|
2017-03-27 19:27:30 +00:00
|
|
|
let s:vim_runtime = expand('<sfile>:p:h')."/.."
|
|
|
|
call pathogen#infect(s:vim_runtime.'/sources_forked/{}')
|
|
|
|
call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}')
|
2017-05-20 09:33:48 +00:00
|
|
|
call pathogen#infect(s:vim_runtime.'/my_plugins/{}')
|
2012-05-29 21:32:24 +00:00
|
|
|
call pathogen#helptags()
|
2012-05-29 20:12:10 +00:00
|
|
|
|
2019-11-30 11:54:13 +00:00
|
|
|
|
2012-05-29 20:12:10 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => bufExplorer plugin
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let g:bufExplorerDefaultHelp=0
|
|
|
|
let g:bufExplorerShowRelativePath=1
|
|
|
|
let g:bufExplorerFindActive=1
|
|
|
|
let g:bufExplorerSortBy='name'
|
|
|
|
map <leader>o :BufExplorer<cr>
|
|
|
|
|
|
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => MRU plugin
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let MRU_Max_Entries = 400
|
|
|
|
map <leader>f :MRU<CR>
|
|
|
|
|
|
|
|
|
2018-02-04 09:07:27 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => YankStack
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let g:yankstack_yank_keys = ['y', 'd']
|
|
|
|
|
2019-11-30 11:54:13 +00:00
|
|
|
nmap <C-p> <Plug>yankstack_substitute_older_paste
|
|
|
|
nmap <C-n> <Plug>yankstack_substitute_newer_paste
|
2018-02-04 09:07:27 +00:00
|
|
|
|
|
|
|
|
2012-05-29 20:12:10 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => CTRL-P
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let g:ctrlp_working_path_mode = 0
|
2012-08-16 02:29:05 +00:00
|
|
|
|
2020-05-10 15:04:55 +00:00
|
|
|
" Quickly find and open a file in the current working directory
|
2019-11-30 11:54:13 +00:00
|
|
|
let g:ctrlp_map = '<C-f>'
|
2014-04-18 12:52:50 +00:00
|
|
|
map <leader>j :CtrlP<cr>
|
2020-05-10 15:04:55 +00:00
|
|
|
|
|
|
|
" Quickly find and open a buffer
|
|
|
|
map <leader>b :CtrlPBuffer<cr>
|
|
|
|
|
2012-08-16 02:29:05 +00:00
|
|
|
let g:ctrlp_max_height = 20
|
|
|
|
let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee'
|
2012-05-29 20:12:10 +00:00
|
|
|
|
|
|
|
|
2013-04-13 17:45:21 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => ZenCoding
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" Enable all functions in all modes
|
|
|
|
let g:user_zen_mode='a'
|
|
|
|
|
|
|
|
|
2012-05-29 20:12:10 +00:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => snipMate (beside <TAB> support <CTRL-j>)
|
|
|
|
""""""""""""""""""""""""""""""
|
2019-11-30 11:54:13 +00:00
|
|
|
ino <C-j> <C-r>=snipMate#TriggerSnippet()<cr>
|
|
|
|
snor <C-j> <esc>i<right><C-r>=snipMate#TriggerSnippet()<cr>
|
2021-05-31 20:26:57 +00:00
|
|
|
let g:snipMate = { 'snippet_version' : 1 }
|
2012-05-29 20:12:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Vim grep
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated'
|
|
|
|
set grepprg=/bin/grep\ -nH
|
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Nerd Tree
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2015-02-13 00:19:27 +00:00
|
|
|
let g:NERDTreeWinPos = "right"
|
2015-07-13 10:38:38 +00:00
|
|
|
let NERDTreeShowHidden=0
|
|
|
|
let NERDTreeIgnore = ['\.pyc$', '__pycache__']
|
2015-02-24 10:45:22 +00:00
|
|
|
let g:NERDTreeWinSize=35
|
2012-05-29 20:12:10 +00:00
|
|
|
map <leader>nn :NERDTreeToggle<cr>
|
2016-12-17 01:20:55 +00:00
|
|
|
map <leader>nb :NERDTreeFromBookmark<Space>
|
2012-05-29 20:12:10 +00:00
|
|
|
map <leader>nf :NERDTreeFind<cr>
|
|
|
|
|
|
|
|
|
2013-04-14 15:48:31 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => vim-multiple-cursors
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2018-07-19 12:56:27 +00:00
|
|
|
let g:multi_cursor_use_default_mapping=0
|
|
|
|
|
|
|
|
" Default mapping
|
|
|
|
let g:multi_cursor_start_word_key = '<C-s>'
|
|
|
|
let g:multi_cursor_select_all_word_key = '<A-s>'
|
|
|
|
let g:multi_cursor_start_key = 'g<C-s>'
|
|
|
|
let g:multi_cursor_select_all_key = 'g<A-s>'
|
|
|
|
let g:multi_cursor_next_key = '<C-s>'
|
|
|
|
let g:multi_cursor_prev_key = '<C-p>'
|
|
|
|
let g:multi_cursor_skip_key = '<C-x>'
|
|
|
|
let g:multi_cursor_quit_key = '<Esc>'
|
2013-04-14 15:48:31 +00:00
|
|
|
|
|
|
|
|
2012-05-29 20:12:10 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => surround.vim config
|
2017-08-16 09:16:53 +00:00
|
|
|
" Annotate strings with gettext
|
2012-05-29 20:12:10 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2012-08-16 02:29:05 +00:00
|
|
|
vmap Si S(i_<esc>f)
|
|
|
|
au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
|
2013-11-16 19:45:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2016-05-14 12:22:57 +00:00
|
|
|
" => lightline
|
2013-11-16 19:45:48 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2016-05-14 12:22:57 +00:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'colorscheme': 'wombat',
|
|
|
|
\ 'active': {
|
|
|
|
\ 'left': [ ['mode', 'paste'],
|
2016-05-14 12:26:42 +00:00
|
|
|
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
|
|
|
|
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
|
2016-05-14 12:22:57 +00:00
|
|
|
\ },
|
|
|
|
\ 'component': {
|
|
|
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}',
|
|
|
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
|
2020-04-16 02:39:13 +00:00
|
|
|
\ 'fugitive': '%{exists("*FugitiveHead")?FugitiveHead():""}'
|
2016-05-14 12:22:57 +00:00
|
|
|
\ },
|
|
|
|
\ 'component_visible_condition': {
|
|
|
|
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
|
|
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
|
2020-04-16 02:39:13 +00:00
|
|
|
\ 'fugitive': '(exists("*FugitiveHead") && ""!=FugitiveHead())'
|
2016-05-14 12:22:57 +00:00
|
|
|
\ },
|
|
|
|
\ 'separator': { 'left': ' ', 'right': ' ' },
|
|
|
|
\ 'subseparator': { 'left': ' ', 'right': ' ' }
|
|
|
|
\ }
|
2015-12-17 15:44:42 +00:00
|
|
|
|
2013-12-28 18:23:13 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Vimroom
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2013-12-29 10:37:14 +00:00
|
|
|
let g:goyo_width=100
|
2014-01-07 00:25:41 +00:00
|
|
|
let g:goyo_margin_top = 2
|
|
|
|
let g:goyo_margin_bottom = 2
|
2013-12-29 10:37:14 +00:00
|
|
|
nnoremap <silent> <leader>z :Goyo<cr>
|
2014-02-08 10:05:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2019-11-16 19:49:59 +00:00
|
|
|
" => Ale (syntax checker and linter)
|
2014-02-08 10:05:16 +00:00
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2018-03-31 14:56:26 +00:00
|
|
|
let g:ale_linters = {
|
2021-08-04 13:57:36 +00:00
|
|
|
\ 'javascript': ['eslint'],
|
2018-03-31 14:56:26 +00:00
|
|
|
\ 'python': ['flake8'],
|
|
|
|
\ 'go': ['go', 'golint', 'errcheck']
|
|
|
|
\}
|
|
|
|
|
|
|
|
nmap <silent> <leader>a <Plug>(ale_next_wrap)
|
2015-07-13 10:42:13 +00:00
|
|
|
|
2018-06-14 10:31:05 +00:00
|
|
|
" Disabling highlighting
|
|
|
|
let g:ale_set_highlights = 0
|
|
|
|
|
|
|
|
" Only run linting when saving the file
|
|
|
|
let g:ale_lint_on_text_changed = 'never'
|
|
|
|
let g:ale_lint_on_enter = 0
|
2023-07-15 10:39:43 +00:00
|
|
|
let g:ale_virtualtext_cursor = 'disabled'
|
2018-06-14 10:31:05 +00:00
|
|
|
|
2015-07-13 10:42:13 +00:00
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Git gutter (Git diff)
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
let g:gitgutter_enabled=0
|
|
|
|
nnoremap <silent> <leader>d :GitGutterToggle<cr>
|
2021-06-06 07:51:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => EditorConfig (project-specific EditorConfig rule)
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
|
2021-10-11 09:29:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" => Fugitive
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" Copy the link to the line of a Git repository to the clipboard
|
|
|
|
nnoremap <leader>v :.GBrowse!<CR>
|
2022-10-15 19:22:13 +00:00
|
|
|
xnoremap <leader>v :GBrowse!<CR>
|