170 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			170 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
| scriptencoding 'utf-8'
 | |
| 
 | |
| " Set leader to space
 | |
| let g:mapleader = ' '
 | |
| 
 | |
| " Plugins
 | |
| call plug#begin('~/.vim/bundle')
 | |
| 
 | |
| " Load local plugins first, allows local dev whilst also being installed.
 | |
| if filereadable(expand('~/.vim/local.vim'))
 | |
|   source ~/.vim/local.vim
 | |
| endif
 | |
| 
 | |
| " vim-airline - improved status bar
 | |
| Plug 'vim-airline/vim-airline'
 | |
| for s:setting in ['left_sep', 'right_sep', 'section_error', 'section_warning']
 | |
|   exec 'let g:airline_'.s:setting.' = ""'
 | |
| endfor
 | |
| " tabline.vim - sanely numbered tabs
 | |
| Plug 'mkitt/tabline.vim'
 | |
| 
 | |
| " YouCompleteMe
 | |
| if !platform#is_windows()
 | |
|   " YouCompleteMe with parameter completion
 | |
|   Plug 'oblitum/YouCompleteMe', {'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
 | |
|   Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
 | |
| endif
 | |
| " vim-cmake-completion - completion & help
 | |
| Plug 'richq/vim-cmake-completion', {'for': ['cmake']}
 | |
| " vimomni - Completion for vimscript
 | |
| Plug 'vim-scripts/vimomni', {'for': ['vim']}
 | |
| 
 | |
| " ale - Asynchronous Lint Engine
 | |
| Plug 'w0rp/ale'
 | |
| let g:ale_sign_error = '▸'
 | |
| let g:ale_sign_warning = '▸'
 | |
| let g:ale_echo_msg_format = '[%linter%] %s'
 | |
| let g:ale_linters = {'c': [], 'cpp': []}
 | |
| hi link ALEError SyntasticError
 | |
| hi link ALEWarning SyntasticWarning
 | |
| hi link ALEErrorSign SyntasticErrorSign
 | |
| hi link ALEWarningSign SyntasticWarningSign
 | |
| 
 | |
| " git diff in the sign column
 | |
| Plug 'airblade/vim-gitgutter'
 | |
| let g:gitgutter_sign_column_always = 1
 | |
| 
 | |
| if has('python')
 | |
|   " format.vim - format with text objects
 | |
|   Plug 'git@bitbucket.org:infektor/format.vim.git'
 | |
| endif
 | |
| 
 | |
| " vim-textobj-user - library for creating text objects
 | |
| Plug 'kana/vim-textobj-user'
 | |
| " vim-textobj-entire - Entire file text object
 | |
| let g:textobj_entire_no_default_key_mappings = 1
 | |
| Plug '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
 | |
| Plug 'sgur/vim-textobj-parameter'
 | |
| " vim-textobj-uri - URI text object
 | |
| Plug 'jceb/vim-textobj-uri'
 | |
| " vim-textobj-comment - Comment text object
 | |
| Plug 'glts/vim-textobj-comment'
 | |
| xmap a/ <Plug>(textobj-comment-a)
 | |
| xmap i/ <Plug>(textobj-comment-i)
 | |
| omap a/ <Plug>(textobj-comment-a)
 | |
| omap i/ <Plug>(textobj-comment-i)
 | |
| 
 | |
| " vim-commentary - toggle comments
 | |
| Plug 'tpope/vim-commentary'
 | |
| " vim-surround - edit delimiters
 | |
| Plug 'tpope/vim-surround'
 | |
| " vim-repeat - better dot command
 | |
| Plug 'tpope/vim-repeat'
 | |
| " vim-fugitive - git wrapper
 | |
| Plug 'tpope/vim-fugitive'
 | |
| " vim-eunuch - unix command warppers
 | |
| Plug 'tpope/vim-eunuch'
 | |
| " vim-vinegar - improved directory browser
 | |
| Plug 'tpope/vim-vinegar'
 | |
| " vim-abolish - CamelCase to under_score to mixedCase
 | |
| Plug 'tpope/vim-abolish'
 | |
| " vim-unimpaired - for pairs of tasks
 | |
| Plug 'tpope/vim-unimpaired'
 | |
| " vim-sensible - sane default settings
 | |
| Plug 'tpope/vim-sensible'
 | |
| " vim-speeddating - sane date manipulation
 | |
| Plug 'tpope/vim-speeddating'
 | |
| " vim-endwise - wisely add end{if,function}, fork with cmake support
 | |
| Plug 'godbyk/vim-endwise', {'branch': 'patch-1'}
 | |
| " vim-jdaddy - text object & formatting for json
 | |
| Plug 'tpope/vim-jdaddy'
 | |
| 
 | |
| " fzf.vim - Fuzzy finder
 | |
| if !platform#is_windows()
 | |
|   Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all --no-update-rc'}
 | |
|   Plug 'junegunn/fzf.vim'
 | |
|   let g:fzf_action = {
 | |
|     \ 'ctrl-t': 'tab split',
 | |
|     \ 'ctrl-s': 'split',
 | |
|     \ 'ctrl-v': 'vsplit' }
 | |
| endif
 | |
| 
 | |
| Plug 'kbenzie/note.vim'
 | |
| let g:note_directory = '~/Sync/Notes'
 | |
| 
 | |
| if !platform#is_windows()
 | |
|   " Seemless vim/tmux pane navigation
 | |
|   Plug 'christoomey/vim-tmux-navigator'
 | |
|   " Enable focus events when in tmux session
 | |
|   Plug 'tmux-plugins/vim-tmux-focus-events'
 | |
| endif
 | |
| 
 | |
| " replay macros with the enter key
 | |
| Plug 'wincent/replay'
 | |
| " vim-matchit - Improved % matching
 | |
| Plug 'opennota/vim-matchit'
 | |
| 
 | |
| " tabular - Table Mode
 | |
| Plug 'dhruvasagar/vim-table-mode'
 | |
| let g:table_mode_map_prefix = '<leader>t'
 | |
| let g:table_mode_toggle_map = 'M'
 | |
| 
 | |
| " DoxygenToolkit.vim - documentation stubs
 | |
| Plug 'vim-scripts/DoxygenToolkit.vim', {'for': ['cpp', 'c']}
 | |
| let g:DoxygenToolkit_commentType = 'C++'
 | |
| 
 | |
| " markdown fenced code block languages
 | |
| let g:markdown_fenced_languages =
 | |
|   \ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
 | |
| 
 | |
| " 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
 | |
| Plug 'guns/xterm-color-table.vim'
 | |
| 
 | |
| " CMake, GLSL, HLSL, OpenCL C syntax
 | |
| Plug 'kbenzie/vim-spirv'
 | |
| Plug 'rperier/vim-cmake-syntax', {'for': ['cmake']}
 | |
| Plug 'tikhomirov/vim-glsl'
 | |
| Plug 'beyondmarc/hlsl.vim'
 | |
| Plug 'frasercrmck/opencl.vim'
 | |
| Plug 'asciidoc/vim-asciidoc'
 | |
| Plug 'mustache/vim-mustache-handlebars'
 | |
| Plug 'joshglendenning/vim-caddyfile'
 | |
| Plug 'kbenzie/vim-khr'
 | |
| 
 | |
| call plug#end()
 |