mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-23 15:14:10 -05:00
Compare commits
No commits in common. "dd31bbfd5cddd8dce1671ad9d17001597de62eef" and "ee6d30175a8eba6f4e6ea295c417065363455fad" have entirely different histories.
dd31bbfd5c
...
ee6d30175a
8 changed files with 40 additions and 22 deletions
|
@ -135,6 +135,8 @@ alias zless="$PAGER"
|
|||
| Leader+t | N | Convert all tabs into spaces and continue session with spaces |
|
||||
| Leader+T | N | Convert all spaces into tabs and continue session with tabs |
|
||||
| Leader+w | N | Remove all trailing whitespace |
|
||||
| Leader+A | N+V | Align comments in document/selection |
|
||||
| Leader+a | N+V | Align comments following non-comments in document/selection |
|
||||
|
||||
#### GVim
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5e8904cd3da4565130c09b77179ae7dddd07358f
|
||||
Subproject commit 6fd9f3c54f80cec8be364594246daf9ac41cbe3e
|
|
@ -1 +1 @@
|
|||
Subproject commit 1aa617d15a9904107a68f95ebf5036b7d4abf64d
|
||||
Subproject commit 3e60a0b460b5bff086b880727392c71276c2c286
|
|
@ -1 +1 @@
|
|||
Subproject commit a07a3e86ea173dd71525ee8a6fb0fcc58122cd87
|
||||
Subproject commit 1d60c4f22e34c12092172955577af807f91664b9
|
|
@ -35,13 +35,10 @@ autocmd FileChangedRO * nested set noreadonly
|
|||
"enable more accurate syntax synchronization
|
||||
autocmd BufEnter * :syntax sync fromstart
|
||||
|
||||
"don't conceal json syntax
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
|
||||
"set given filenames to various filetypes
|
||||
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setlocal ft=aspnet
|
||||
autocmd BufNewFile,BufRead *.gradle setlocal ft=groovy
|
||||
autocmd BufNewFile,BufRead *eslintrc setlocal ft=json
|
||||
autocmd BufNewFile,BufRead cjdroute.conf,ircd.conf,.eslintrc setlocal ft=json
|
||||
autocmd BufNewFile,BufRead *.muttrc setlocal ft=muttrc
|
||||
autocmd BufNewFile,BufRead *.neomuttrc setlocal ft=neomuttrc
|
||||
autocmd BufNewFile,BufRead *pacman.conf setlocal ft=conf
|
||||
|
@ -51,7 +48,8 @@ autocmd FileChangedRO * nested set noreadonly
|
|||
autocmd BufEnter,FileType sh setlocal iskeyword-=.
|
||||
autocmd Filetype text,markdown,gitcommit,mail setlocal nonumber spell nolist linebreak tabstop=2 shiftwidth=2 breakat&vim breakat-=* breakat-=. breakat-=/ breakat-=? breakat-=, breakat-=: breakat-=; breakat-=! "set some defaults for word processing
|
||||
autocmd Filetype text,gitcommit,mail setlocal wrap
|
||||
autocmd FileType tmux setlocal commentstring=#\ %s "set the comment string to #
|
||||
autocmd FileType tmux,taskrc setlocal commentstring=#\ %s "set the comment string to #
|
||||
autocmd FileType slrnrc setlocal commentstring=%%\ %s "set the comment string to %
|
||||
autocmd FileType scss setlocal iskeyword+=$
|
||||
autocmd FileType javascript setlocal iskeyword+=- iskeyword+=.
|
||||
|
||||
|
|
|
@ -137,6 +137,10 @@
|
|||
" <Leader>t | (N) -> convert tabs into spaces
|
||||
" <Leader>T | (N) -> convert spaces into tabs
|
||||
" <Leader>w | (N) -> remove whitespace
|
||||
" <Leader>A | (N) -> aligns comments using the comment symbol
|
||||
" <Leader>A | (V) -> aligns selected comments
|
||||
" <Leader>a | (N) -> aligns all comments after text
|
||||
" <Leader>a | (V) -> aligns selected comments after text
|
||||
" <Tab> | (V) -> indent all the lines currently selected
|
||||
" <Tab> | (N) -> indent the current line
|
||||
" <Leader>> | (V) -> indent all the lines currently selected
|
||||
|
@ -563,6 +567,14 @@
|
|||
"remove trailing whitespace
|
||||
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
||||
|
||||
"align comments
|
||||
nnoremap <Leader>A :exe "%Tabular" '/^[^'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
|
||||
vnoremap <Leader>A <C-u>:exe "'<,'>Tabular" '/^[^'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
|
||||
|
||||
"align only comments following non-comments
|
||||
nnoremap <Leader>a :exe "%Tabular" '/^ *[^'.matchstr(&commentstring, '[^%]*').' ][^\'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
|
||||
vnoremap <Leader>a <C-u>:exe "'<,'>Tabular" '/^ *[^'.matchstr(&commentstring, '[^%]*').' ][^\'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
|
||||
|
||||
"tab/<Leader>> and untab/<Leader>< the currently selected lines
|
||||
vnoremap <Tab> >gv
|
||||
nnoremap <Tab> v>gv<Esc>
|
||||
|
|
6
vim/config/plugins/tcomment.vim
Normal file
6
vim/config/plugins/tcomment.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
"remove right-hand whitespace from all lines on uncomment
|
||||
let g:tcomment#rstrip_on_uncomment = 2
|
||||
|
||||
"configure custom comment styles
|
||||
call tcomment#type#Define('vue', '// %s')
|
||||
call tcomment#type#Define('blade', '{{-- %s --}}')
|
28
vimrc
28
vimrc
|
@ -41,7 +41,7 @@
|
|||
runtime config/settings.vim
|
||||
|
||||
"Initialize Plugins:
|
||||
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
|
||||
let pathogen_disabled = []
|
||||
|
||||
if has('python3')
|
||||
"configure pythonx and check for the python-neovim and python-msgpack libraries if python3 is found
|
||||
|
@ -72,39 +72,39 @@
|
|||
endif
|
||||
else
|
||||
"if python isn't available disable plugins that depend on it and set library variables to false
|
||||
call add(g:pathogen_disabled, 'MatchTagAlways')
|
||||
call add(pathogen_disabled, 'MatchTagAlways')
|
||||
let g:python_neovim = 0
|
||||
let g:python_msgpack = 0
|
||||
endif
|
||||
|
||||
"don't load vim-gutentags if ctags can't be found
|
||||
if !executable('ctags')
|
||||
call add(g:pathogen_disabled, 'vim-gutentags')
|
||||
call add(pathogen_disabled, 'vim-gutentags')
|
||||
endif
|
||||
|
||||
if !g:python_neovim || !g:python_msgpack
|
||||
"don't load deoplete if either of its python dependencies are missing
|
||||
call add(g:pathogen_disabled, 'deoplete.nvim')
|
||||
call add(g:pathogen_disabled, 'neco-syntax')
|
||||
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
call add(pathogen_disabled, 'deoplete.nvim')
|
||||
call add(pathogen_disabled, 'neco-syntax')
|
||||
call add(pathogen_disabled, 'nvim-yarp')
|
||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
elseif has('nvim')
|
||||
"don't load the neovim compatibility plugins required by deoplete if actually running neovim
|
||||
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
call add(pathogen_disabled, 'nvim-yarp')
|
||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
endif
|
||||
|
||||
"disable autocompletion logic when running in vimpager mode
|
||||
if exists('g:vimpager.enabled')
|
||||
call add(g:pathogen_disabled, 'deoplete.nvim')
|
||||
call add(g:pathogen_disabled, 'neco-syntax')
|
||||
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
call add(pathogen_disabled, 'deoplete.nvim')
|
||||
call add(pathogen_disabled, 'neco-syntax')
|
||||
call add(pathogen_disabled, 'nvim-yarp')
|
||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
endif
|
||||
|
||||
"if neovim is being used we should disable plugins that aren't compatible or necessary
|
||||
if has('nvim')
|
||||
call add(g:pathogen_disabled, 'vim-fixkey')
|
||||
call add(pathogen_disabled, 'vim-fixkey')
|
||||
endif
|
||||
|
||||
"use pathogen to load plugins that haven't been disabled
|
||||
|
|
Loading…
Reference in a new issue