201 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			201 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
| set encoding=utf-8
 | |
| scriptencoding 'utf-8'
 | |
| 
 | |
| " Set leader to space
 | |
| let g:mapleader = ' '
 | |
| 
 | |
| if has('autocmd')
 | |
|   filetype plugin indent on
 | |
| endif
 | |
| if has('syntax') && !exists('g:syntax_on')
 | |
|   syntax enable
 | |
| endif
 | |
| 
 | |
| if exists('*minpac#init')
 | |
|   " When minpac is loaded initialize and define the Pack command.
 | |
|   call minpac#init()
 | |
|   command! -nargs=+ Pack call minpac#add(<args>)
 | |
| else
 | |
|   " Otherwise define the Pack command to do nothing.
 | |
|   command! -nargs=+ Pack
 | |
| endif
 | |
| 
 | |
| " Append work config to the runttime path.
 | |
| set runtimepath+=~/.config/work
 | |
| 
 | |
| " vim-airline - improved status bar
 | |
| Pack 'vim-airline/vim-airline'
 | |
| let g:airline#extensions#branch#enabled = 0
 | |
| let g:airline#extensions#hunks#enabled = 0
 | |
| for s:setting in ['left_sep', 'right_sep', 'section_error', 'section_warning']
 | |
|   exec 'let g:airline_'.s:setting.' = ""'
 | |
| endfor
 | |
| " tabline.vim - sanely numbered tabs
 | |
| Pack 'mkitt/tabline.vim'
 | |
| 
 | |
| " YouCompleteMe
 | |
| " TODO: Try out neovim completion plugins to see if they are better
 | |
| if !platform#is_windows()
 | |
|   if platform#is_linux()
 | |
|     " YouCompleteMe with parameter completion
 | |
|     let s:YouCompleteMe = 'oblitum/YouCompleteMe'
 | |
|   else
 | |
|     " YouCompleteMe upstream works best on macOS
 | |
|     let s:YouCompleteMe = 'Valloric/YouCompleteMe'
 | |
|   endif
 | |
|   Pack s:YouCompleteMe,
 | |
|     \ {'type': 'opt', 'do': '!./install.py --clang-completer'}
 | |
|   let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
 | |
|   let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
 | |
|   let g:ycm_min_num_of_chars_for_completion = 1
 | |
|   let g:ycm_complete_in_comments = 1
 | |
|   let g:ycm_complete_in_strings = 1
 | |
|   let g:ycm_collect_identifiers_from_comments_and_strings = 1
 | |
|   let g:ycm_seed_identifiers_with_syntax = 1
 | |
|   let g:ycm_autoclose_preview_window_after_insertion = 1
 | |
|   let g:ycm_always_populate_location_list = 1
 | |
|   let g:ycm_error_symbol = '▸'
 | |
|   let g:ycm_warning_symbol = '▸'
 | |
|   let g:ycm_goto_buffer_command = 'horizontal-split'
 | |
| endif
 | |
| if has('python')
 | |
|   " ultisnips - snippet engine
 | |
|   Pack 'SirVer/ultisnips'
 | |
|   Pack 'honza/vim-snippets'
 | |
| endif
 | |
| " vim-cmake-completion - completion & help
 | |
| Pack 'kbenzie/vim-cmake-completion', {'type': 'opt'}
 | |
| " vimomni - Completion for vimscript
 | |
| Pack 'vim-scripts/vimomni', {'type': 'opt'}
 | |
| 
 | |
| " ale - Asynchronous Lint Engine
 | |
| Pack 'w0rp/ale'
 | |
| let g:ale_sign_error = '▸'
 | |
| let g:ale_sign_warning = '▸'
 | |
| let g:ale_echo_msg_format = '[%linter%] %s (%code%)'
 | |
| let g:ale_linters = {'c': [], 'cpp': []}
 | |
| 
 | |
| " git diff in the sign column
 | |
| Pack 'airblade/vim-gitgutter'
 | |
| if exists('&signcolumn')
 | |
|   set signcolumn=yes
 | |
| else
 | |
|   let g:gitgutter_sign_column_always = 1
 | |
| endif
 | |
| 
 | |
| if has('python')
 | |
|   " format.vim - format with text objects
 | |
|   Pack 'git@bitbucket.org:infektor/format.vim.git'
 | |
| endif
 | |
| 
 | |
| " vim-textobj-user - library for creating text objects
 | |
| Pack 'kana/vim-textobj-user'
 | |
| " vim-textobj-entire - Entire file text object
 | |
| let g:textobj_entire_no_default_key_mappings = 1
 | |
| Pack 'kana/vim-textobj-entire'
 | |
| xmap a% <Plug>(textobj-entire-a)
 | |
| omap a% <Plug>(textobj-entire-a)
 | |
| xmap i% <Plug>(textobj-entire-i)
 | |
| omap i% <Plug>(textobj-entire-i)
 | |
| " vim-textobj-parameter - Parameter text object
 | |
| Pack 'sgur/vim-textobj-parameter'
 | |
| " vim-textobj-uri - URI text object
 | |
| Pack 'jceb/vim-textobj-uri'
 | |
| " vim-textobj-comment - Comment text object
 | |
| Pack 'glts/vim-textobj-comment'
 | |
| omap a/ <Plug>(textobj-comment-a)
 | |
| xmap a/ <Plug>(textobj-comment-a)
 | |
| omap i/ <Plug>(textobj-comment-i)
 | |
| xmap i/ <Plug>(textobj-comment-i)
 | |
| " vim-textobj-sentence - Improved sentence text object
 | |
| Pack 'reedes/vim-textobj-sentence'
 | |
| 
 | |
| " vim-commentary - toggle comments
 | |
| Pack 'tpope/vim-commentary'
 | |
| " vim-surround - edit delimiters
 | |
| Pack 'tpope/vim-surround'
 | |
| " vim-repeat - better dot command
 | |
| Pack 'tpope/vim-repeat'
 | |
| " vim-fugitive - git wrapper
 | |
| Pack 'tpope/vim-fugitive'
 | |
| " vim-eunuch - unix command warppers
 | |
| Pack 'tpope/vim-eunuch'
 | |
| " vim-vinegar - improved directory browser
 | |
| Pack 'tpope/vim-vinegar'
 | |
| " vim-abolish - CamelCase to under_score to mixedCase
 | |
| " TODO: Copy the good bit remove this plugin
 | |
| Pack 'tpope/vim-abolish'
 | |
| " vim-unimpaired - for pairs of tasks
 | |
| Pack 'tpope/vim-unimpaired'
 | |
| " vim-speeddating - sane date manipulation
 | |
| Pack 'tpope/vim-speeddating'
 | |
| " vim-endwise - wisely add end{if,function}, fork with cmake support
 | |
| Pack 'godbyk/vim-endwise', {'rev': 'patch-1'}
 | |
| " vim-jdaddy - text object & formatting for json
 | |
| Pack 'tpope/vim-jdaddy'
 | |
| " vim-projectionist - granular project configuration
 | |
| Pack 'tpope/vim-projectionist'
 | |
| 
 | |
| " fzf.vim - Fuzzy finder
 | |
| if !platform#is_windows()
 | |
|   Pack 'junegunn/fzf'
 | |
|   Pack 'junegunn/fzf.vim'
 | |
|   let g:fzf_action = {
 | |
|   \   'ctrl-t': 'tab split',
 | |
|   \   'ctrl-s': 'split',
 | |
|   \   'ctrl-v': 'vsplit'
 | |
|   \ }
 | |
| endif
 | |
| 
 | |
| Pack 'kbenzie/note.vim'
 | |
| let g:note_directory = '~/Sync/Notes'
 | |
| 
 | |
| if !has('win32')
 | |
|   " Seemless vim/tmux pane navigation
 | |
|   Pack 'christoomey/vim-tmux-navigator'
 | |
|   " Enable focus events when in tmux session
 | |
|   Pack 'tmux-plugins/vim-tmux-focus-events'
 | |
| endif
 | |
| 
 | |
| " replay macros with the enter key
 | |
| Pack 'wincent/replay'
 | |
| " vim-matchit - Improved % matching
 | |
| Pack 'andymass/vim-matchup'
 | |
| 
 | |
| " vim-table-mode - Easy table manipulation
 | |
| Pack 'dhruvasagar/vim-table-mode'
 | |
| let g:table_mode_map_prefix = '<leader>t'
 | |
| let g:table_mode_toggle_map = 'M'
 | |
| 
 | |
| " DoxygenToolkit.vim - documentation stubs
 | |
| Pack 'vim-scripts/DoxygenToolkit.vim', {'type': 'opt'}
 | |
| let g:DoxygenToolkit_commentType = 'C++'
 | |
| 
 | |
| " markdown fenced code block languages
 | |
| let g:markdown_fenced_languages =
 | |
|   \ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
 | |
| 
 | |
| " Python folding
 | |
| Pack 'kalekundert/vim-coiled-snake'
 | |
| 
 | |
| " Enable builtin syntax folding
 | |
| let g:xml_syntax_folding = 1
 | |
| let g:sh_fold_enabled = 1
 | |
| 
 | |
| " xterm-color-table.vim - view term and hex colors
 | |
| Pack 'guns/xterm-color-table.vim'
 | |
| 
 | |
| " SPIR-V syntax
 | |
| Pack 'kbenzie/vim-spirv'
 | |
| let g:spirv_current_id_highlight = 'ctermbg=234, guibg=#1c1c1c'
 | |
| 
 | |
| " CMake, GLSL, HLSL, OpenCL C syntax
 | |
| Pack 'rperier/vim-cmake-syntax'
 | |
| Pack 'tikhomirov/vim-glsl'
 | |
| Pack 'beyondmarc/hlsl.vim'
 | |
| Pack 'frasercrmck/opencl.vim'
 | |
| Pack 'asciidoc/vim-asciidoc'
 | |
| Pack 'mustache/vim-mustache-handlebars'
 | |
| Pack 'joshglendenning/vim-caddyfile'
 | |
| Pack 'kbenzie/vim-khr'
 |