""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Important: " This requires that you install https://github.com/amix/vimrc ! " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""" " => Load pathogen paths """""""""""""""""""""""""""""" let s:vim_runtime = expand(':p:h')."/.." call pathogen#infect(s:vim_runtime.'/sources_forked/{}') call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}') call pathogen#infect(s:vim_runtime.'/my_plugins/{}') call pathogen#helptags() """""""""""""""""""""""""""""" " => bufExplorer plugin """""""""""""""""""""""""""""" let g:bufExplorerDefaultHelp=0 let g:bufExplorerShowRelativePath=1 let g:bufExplorerFindActive=1 let g:bufExplorerSortBy='name' map o :BufExplorer """""""""""""""""""""""""""""" " => MRU plugin """""""""""""""""""""""""""""" let MRU_Max_Entries = 400 map f :MRU """""""""""""""""""""""""""""" " => YankStack """""""""""""""""""""""""""""" let g:yankstack_yank_keys = ['y', 'd'] nmap yankstack_substitute_older_paste nmap yankstack_substitute_newer_paste """""""""""""""""""""""""""""" " => CTRL-P """""""""""""""""""""""""""""" let g:ctrlp_working_path_mode = 0 " Quickly find and open a file in the current working directory let g:ctrlp_map = '' map j :CtrlP " Quickly find and open a buffer map b :CtrlPBuffer let g:ctrlp_max_height = 20 let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee' """""""""""""""""""""""""""""" " => ZenCoding """""""""""""""""""""""""""""" " Enable all functions in all modes let g:user_zen_mode='a' """""""""""""""""""""""""""""" " => snipMate (beside support ) """""""""""""""""""""""""""""" ino =snipMate#TriggerSnippet() snor i=snipMate#TriggerSnippet() let g:snipMate = { 'snippet_version' : 1 } """""""""""""""""""""""""""""" " => Vim grep """""""""""""""""""""""""""""" let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated' set grepprg=/bin/grep\ -nH """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Nerd Tree """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:NERDTreeWinPos = "left" let NERDTreeShowHidden=0 let NERDTreeIgnore = ['\.pyc$', '__pycache__'] let g:NERDTreeWinSize=35 map nn :NERDTreeToggle map nb :NERDTreeFromBookmark map nf :NERDTreeFind autocmd VimEnter * NERDTree | wincmd p autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => vim-multiple-cursors """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:multi_cursor_use_default_mapping=0 " Default mapping let g:multi_cursor_start_word_key = '' let g:multi_cursor_select_all_word_key = '' let g:multi_cursor_start_key = 'g' let g:multi_cursor_select_all_key = 'g' let g:multi_cursor_next_key = '' let g:multi_cursor_prev_key = '' let g:multi_cursor_skip_key = '' let g:multi_cursor_quit_key = '' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => surround.vim config " Annotate strings with gettext """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" vmap Si S(i_f) au FileType mako vmap Si S"i${ _(2f"a) } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => lightline """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 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("*FugitiveHead")?FugitiveHead():""}' \ }, \ 'component_visible_condition': { \ 'readonly': '(&filetype!="help"&& &readonly)', \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', \ 'fugitive': '(exists("*FugitiveHead") && ""!=FugitiveHead())' \ }, \ 'separator': { 'left': ' ', 'right': ' ' }, \ 'subseparator': { 'left': ' ', 'right': ' ' } \ } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Vimroom """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:goyo_width=100 let g:goyo_margin_top = 2 let g:goyo_margin_bottom = 2 nnoremap z :Goyo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Ale (syntax checker and linter) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:ale_linters = { \ 'javascript': ['eslint'], \ 'python': ['flake8'], \ 'go': ['go', 'golint', 'errcheck'] \} nmap a (ale_next_wrap) " 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 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Git gutter (Git diff) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:gitgutter_enabled=1 nnoremap d :GitGutterToggle """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => EditorConfig (project-specific EditorConfig rule) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:EditorConfig_exclude_patterns = ['fugitive://.*'] """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Fugitive """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Copy the link to the line of a Git repository to the clipboard nnoremap v :.GBrowse! xnoremap v :'<'>GBrowse!