mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-23 23:24:10 -05:00
Compare commits
8 commits
ee6d30175a
...
dd31bbfd5c
Author | SHA1 | Date | |
---|---|---|---|
|
dd31bbfd5c | ||
|
faa4895698 | ||
|
e378a6af38 | ||
|
18f1aeb242 | ||
|
fb1797cd84 | ||
|
9e92da6cde | ||
|
125961a30f | ||
|
ad59ae0762 |
8 changed files with 22 additions and 40 deletions
|
@ -135,8 +135,6 @@ alias zless="$PAGER"
|
||||||
| Leader+t | N | Convert all tabs into spaces and continue session with spaces |
|
| 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+T | N | Convert all spaces into tabs and continue session with tabs |
|
||||||
| Leader+w | N | Remove all trailing whitespace |
|
| 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
|
#### GVim
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6fd9f3c54f80cec8be364594246daf9ac41cbe3e
|
Subproject commit 5e8904cd3da4565130c09b77179ae7dddd07358f
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3e60a0b460b5bff086b880727392c71276c2c286
|
Subproject commit 1aa617d15a9904107a68f95ebf5036b7d4abf64d
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1d60c4f22e34c12092172955577af807f91664b9
|
Subproject commit a07a3e86ea173dd71525ee8a6fb0fcc58122cd87
|
|
@ -35,10 +35,13 @@ autocmd FileChangedRO * nested set noreadonly
|
||||||
"enable more accurate syntax synchronization
|
"enable more accurate syntax synchronization
|
||||||
autocmd BufEnter * :syntax sync fromstart
|
autocmd BufEnter * :syntax sync fromstart
|
||||||
|
|
||||||
|
"don't conceal json syntax
|
||||||
|
let g:vim_json_syntax_conceal = 0
|
||||||
|
|
||||||
"set given filenames to various filetypes
|
"set given filenames to various filetypes
|
||||||
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setlocal ft=aspnet
|
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setlocal ft=aspnet
|
||||||
autocmd BufNewFile,BufRead *.gradle setlocal ft=groovy
|
autocmd BufNewFile,BufRead *.gradle setlocal ft=groovy
|
||||||
autocmd BufNewFile,BufRead cjdroute.conf,ircd.conf,.eslintrc setlocal ft=json
|
autocmd BufNewFile,BufRead *eslintrc setlocal ft=json
|
||||||
autocmd BufNewFile,BufRead *.muttrc setlocal ft=muttrc
|
autocmd BufNewFile,BufRead *.muttrc setlocal ft=muttrc
|
||||||
autocmd BufNewFile,BufRead *.neomuttrc setlocal ft=neomuttrc
|
autocmd BufNewFile,BufRead *.neomuttrc setlocal ft=neomuttrc
|
||||||
autocmd BufNewFile,BufRead *pacman.conf setlocal ft=conf
|
autocmd BufNewFile,BufRead *pacman.conf setlocal ft=conf
|
||||||
|
@ -48,8 +51,7 @@ autocmd FileChangedRO * nested set noreadonly
|
||||||
autocmd BufEnter,FileType sh setlocal iskeyword-=.
|
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,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 text,gitcommit,mail setlocal wrap
|
||||||
autocmd FileType tmux,taskrc setlocal commentstring=#\ %s "set the comment string to #
|
autocmd FileType tmux 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 scss setlocal iskeyword+=$
|
||||||
autocmd FileType javascript setlocal iskeyword+=- iskeyword+=.
|
autocmd FileType javascript setlocal iskeyword+=- iskeyword+=.
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,6 @@
|
||||||
" <Leader>t | (N) -> convert tabs into spaces
|
" <Leader>t | (N) -> convert tabs into spaces
|
||||||
" <Leader>T | (N) -> convert spaces into tabs
|
" <Leader>T | (N) -> convert spaces into tabs
|
||||||
" <Leader>w | (N) -> remove whitespace
|
" <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> | (V) -> indent all the lines currently selected
|
||||||
" <Tab> | (N) -> indent the current line
|
" <Tab> | (N) -> indent the current line
|
||||||
" <Leader>> | (V) -> indent all the lines currently selected
|
" <Leader>> | (V) -> indent all the lines currently selected
|
||||||
|
@ -567,14 +563,6 @@
|
||||||
"remove trailing whitespace
|
"remove trailing whitespace
|
||||||
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
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
|
"tab/<Leader>> and untab/<Leader>< the currently selected lines
|
||||||
vnoremap <Tab> >gv
|
vnoremap <Tab> >gv
|
||||||
nnoremap <Tab> v>gv<Esc>
|
nnoremap <Tab> v>gv<Esc>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
"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
|
runtime config/settings.vim
|
||||||
|
|
||||||
"Initialize Plugins:
|
"Initialize Plugins:
|
||||||
let pathogen_disabled = []
|
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
|
||||||
|
|
||||||
if has('python3')
|
if has('python3')
|
||||||
"configure pythonx and check for the python-neovim and python-msgpack libraries if python3 is found
|
"configure pythonx and check for the python-neovim and python-msgpack libraries if python3 is found
|
||||||
|
@ -72,39 +72,39 @@
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
"if python isn't available disable plugins that depend on it and set library variables to false
|
"if python isn't available disable plugins that depend on it and set library variables to false
|
||||||
call add(pathogen_disabled, 'MatchTagAlways')
|
call add(g:pathogen_disabled, 'MatchTagAlways')
|
||||||
let g:python_neovim = 0
|
let g:python_neovim = 0
|
||||||
let g:python_msgpack = 0
|
let g:python_msgpack = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"don't load vim-gutentags if ctags can't be found
|
"don't load vim-gutentags if ctags can't be found
|
||||||
if !executable('ctags')
|
if !executable('ctags')
|
||||||
call add(pathogen_disabled, 'vim-gutentags')
|
call add(g:pathogen_disabled, 'vim-gutentags')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !g:python_neovim || !g:python_msgpack
|
if !g:python_neovim || !g:python_msgpack
|
||||||
"don't load deoplete if either of its python dependencies are missing
|
"don't load deoplete if either of its python dependencies are missing
|
||||||
call add(pathogen_disabled, 'deoplete.nvim')
|
call add(g:pathogen_disabled, 'deoplete.nvim')
|
||||||
call add(pathogen_disabled, 'neco-syntax')
|
call add(g:pathogen_disabled, 'neco-syntax')
|
||||||
call add(pathogen_disabled, 'nvim-yarp')
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||||
elseif has('nvim')
|
elseif has('nvim')
|
||||||
"don't load the neovim compatibility plugins required by deoplete if actually running neovim
|
"don't load the neovim compatibility plugins required by deoplete if actually running neovim
|
||||||
call add(pathogen_disabled, 'nvim-yarp')
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"disable autocompletion logic when running in vimpager mode
|
"disable autocompletion logic when running in vimpager mode
|
||||||
if exists('g:vimpager.enabled')
|
if exists('g:vimpager.enabled')
|
||||||
call add(pathogen_disabled, 'deoplete.nvim')
|
call add(g:pathogen_disabled, 'deoplete.nvim')
|
||||||
call add(pathogen_disabled, 'neco-syntax')
|
call add(g:pathogen_disabled, 'neco-syntax')
|
||||||
call add(pathogen_disabled, 'nvim-yarp')
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
||||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"if neovim is being used we should disable plugins that aren't compatible or necessary
|
"if neovim is being used we should disable plugins that aren't compatible or necessary
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
call add(pathogen_disabled, 'vim-fixkey')
|
call add(g:pathogen_disabled, 'vim-fixkey')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"use pathogen to load plugins that haven't been disabled
|
"use pathogen to load plugins that haven't been disabled
|
||||||
|
|
Loading…
Reference in a new issue