Compare commits

..

No commits in common. "51621e81341cea1608dd7049cc0eb55ccd6abde8" and "3a60c0abcfb54af58207d1c2276225a3e6c13d44" have entirely different histories.

9 changed files with 2522 additions and 89 deletions

View File

@ -4,8 +4,3 @@
- vim-vint
- yamllint
- cmakelint
- repo:
- remote: https://github.com/k-takata/minpac.git
location: ~/.vim/pack/minpac/opt/minpac
- command:
- vim +PackUpdate +quitall

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
local.vim
.netrwhist
bundle/*
pack/*
spell/*

View File

@ -1,19 +1,18 @@
" Add Doxygen documentation generation plugin.
packadd DoxygenToolkit.vim
nnoremap <leader>d :Dox<CR>
" Surround visual block in #if 0 block.
" Surround visual block in #if 0 block
vmap 0 V'<[ ki#if 0<Esc>'>o#endif<Esc>
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
" Set 'commentstring' to single line comment style.
setlocal commentstring=//%s
" Stop automatic new lines which typing long single liners.
" Stop automatic new lines which typing long single liners
setlocal textwidth=0
" Map K to get YouCompleteMe documentation.
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" "ys{motion}t" turns "word" -> "TODO(word):"
let b:surround_{char2nr("t")} = "TODO(\r):"
" "ys{motion}/" turns "text" into "/*text*/"
let b:surround_{char2nr("/")} = "/*\r*/"
" Map K to get YouCompleteMe documentation.
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" DoxygenToolkit
nnoremap <leader>d :Dox<CR>

View File

@ -1,6 +1,3 @@
" Add omnifunc completion plugin.
packadd vim-cmake-completion
" Enable syntax folding, see .vim/after/syntax/cmake.vim
setlocal foldmethod=syntax
" Set comment string

View File

@ -1,5 +1,4 @@
" Add Doxygen documentation generation plugin.
packadd DoxygenToolkit.vim
nnoremap <leader>d :Dox<CR>
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" DoxygenToolkit
nnoremap <leader>d :Dox<CR>

View File

@ -1,6 +1,3 @@
" Add omnifunc completion package.
packadd vimomni
" Mapping for Vim help of the word under cursor.
nnoremap K :help <C-r><C-w><CR>

2454
autoload/plug.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,3 @@
" minpac
command! PackUpdate packadd minpac | source $MYVIMRC |
\ call minpac#update('', {'do': 'call minpac#status()'})
command! PackStatus packadd minpac | source $MYVIMRC | call minpac#status()
command! PackClean packadd minpac | source $MYVIMRC | call minpac#clean()
" YouCompleteMe
nnoremap <leader>fi :YcmCompleter FixIt<CR>
nnoremap <leader>gd :YcmCompleter GoTo<CR>

121
vimrc
View File

@ -11,40 +11,38 @@ 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
" 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
Pack 'vim-airline/vim-airline'
" TODO: Get rid of airline and roll your own
Plug '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'
Plug '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'
Plug 'oblitum/YouCompleteMe', {'do': './install.py --clang-completer'}
else
" YouCompleteMe upstream works best on macOS
let s:YouCompleteMe = 'Valloric/YouCompleteMe'
Plug 'Valloric/YouCompleteMe', {'do': './install.py --clang-completer'}
endif
Pack 'Valloric/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
@ -60,23 +58,22 @@ if !platform#is_windows()
endif
if has('python')
" ultisnips - snippet engine
Pack 'SirVer/ultisnips'
Pack 'honza/vim-snippets'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
endif
" vim-cmake-completion - completion & help
Pack 'kbenzie/vim-cmake-completion', {'type': 'opt'}
Plug 'kbenzie/vim-cmake-completion', {'for': ['cmake']}
" vimomni - Completion for vimscript
Pack 'vim-scripts/vimomni', {'type': 'opt'}
Plug 'vim-scripts/vimomni', {'for': ['vim']}
" ale - Asynchronous Lint Engine
Pack 'w0rp/ale'
Plug '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'
Plug 'airblade/vim-gitgutter'
if exists('&signcolumn')
set signcolumn=yes
else
@ -85,61 +82,61 @@ endif
if has('python')
" format.vim - format with text objects
Pack 'git@bitbucket.org:infektor/format.vim.git'
Plug 'git@bitbucket.org:infektor/format.vim.git'
endif
" vim-textobj-user - library for creating text objects
Pack 'kana/vim-textobj-user'
Plug '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'
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
Pack 'sgur/vim-textobj-parameter'
Plug 'sgur/vim-textobj-parameter'
" vim-textobj-uri - URI text object
Pack 'jceb/vim-textobj-uri'
Plug 'jceb/vim-textobj-uri'
" vim-textobj-comment - Comment text object
Pack 'glts/vim-textobj-comment'
Plug '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'
Plug 'reedes/vim-textobj-sentence'
" vim-commentary - toggle comments
Pack 'tpope/vim-commentary'
Plug 'tpope/vim-commentary'
" vim-surround - edit delimiters
Pack 'tpope/vim-surround'
Plug 'tpope/vim-surround'
" vim-repeat - better dot command
Pack 'tpope/vim-repeat'
Plug 'tpope/vim-repeat'
" vim-fugitive - git wrapper
Pack 'tpope/vim-fugitive'
Plug 'tpope/vim-fugitive'
" vim-eunuch - unix command warppers
Pack 'tpope/vim-eunuch'
Plug 'tpope/vim-eunuch'
" vim-vinegar - improved directory browser
Pack 'tpope/vim-vinegar'
Plug 'tpope/vim-vinegar'
" vim-abolish - CamelCase to under_score to mixedCase
" TODO: Copy the good bit remove this plugin
Pack 'tpope/vim-abolish'
Plug 'tpope/vim-abolish'
" vim-unimpaired - for pairs of tasks
Pack 'tpope/vim-unimpaired'
Plug 'tpope/vim-unimpaired'
" vim-speeddating - sane date manipulation
Pack 'tpope/vim-speeddating'
Plug 'tpope/vim-speeddating'
" vim-endwise - wisely add end{if,function}, fork with cmake support
Pack 'godbyk/vim-endwise', {'rev': 'patch-1'}
Plug 'godbyk/vim-endwise', {'branch': 'patch-1'}
" vim-jdaddy - text object & formatting for json
Pack 'tpope/vim-jdaddy'
Plug 'tpope/vim-jdaddy'
" vim-projectionist - granular project configuration
Pack 'tpope/vim-projectionist'
Plug 'tpope/vim-projectionist'
" fzf.vim - Fuzzy finder
if !platform#is_windows()
" Pack 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all --no-update-rc'}
Pack 'junegunn/fzf.vim'
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',
@ -147,28 +144,28 @@ if !platform#is_windows()
\ }
endif
Pack 'kbenzie/note.vim'
Plug 'kbenzie/note.vim'
let g:note_directory = '~/Sync/Notes'
if !has('win32')
if !platform#is_windows()
" Seemless vim/tmux pane navigation
Pack 'christoomey/vim-tmux-navigator'
Plug 'christoomey/vim-tmux-navigator'
" Enable focus events when in tmux session
Pack 'tmux-plugins/vim-tmux-focus-events'
Plug 'tmux-plugins/vim-tmux-focus-events'
endif
" replay macros with the enter key
Pack 'wincent/replay'
Plug 'wincent/replay'
" vim-matchit - Improved % matching
Pack 'andymass/vim-matchup'
Plug 'andymass/vim-matchup'
" vim-table-mode - Easy table manipulation
Pack 'dhruvasagar/vim-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
Pack 'vim-scripts/DoxygenToolkit.vim', {'type': 'opt'}
Plug 'vim-scripts/DoxygenToolkit.vim', {'for': ['cpp', 'c']}
let g:DoxygenToolkit_commentType = 'C++'
" markdown fenced code block languages
@ -176,25 +173,27 @@ let g:markdown_fenced_languages =
\ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
" Python folding
Pack 'kalekundert/vim-coiled-snake'
Plug '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'
Plug 'guns/xterm-color-table.vim'
" SPIR-V syntax
Pack 'kbenzie/vim-spirv'
Plug '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'
Plug 'rperier/vim-cmake-syntax'
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()