Vim config updates
This commit is contained in:
parent
c3f3999e02
commit
57b4f7048f
2 changed files with 15 additions and 9 deletions
5
vim/vim.xdg.symlink/Ultisnips/vim.snippets
Normal file
5
vim/vim.xdg.symlink/Ultisnips/vim.snippets
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
snippet gdef "Default global variable"
|
||||||
|
if !exists("g:${1:...}")
|
||||||
|
g:$1 = $2
|
||||||
|
endif$0
|
||||||
|
endsnippet
|
|
@ -115,34 +115,33 @@ matchadd('ColorColumn', '\%82v', 100)
|
||||||
|
|
||||||
# Mappings etc
|
# Mappings etc
|
||||||
g:mapleader = "\<space>"
|
g:mapleader = "\<space>"
|
||||||
g:localmapleader = "\\"
|
g:maplocalleader = ","
|
||||||
|
|
||||||
# Use jk to escape back to normal
|
# Use jk to escape back to normal
|
||||||
inoremap jk <esc>
|
inoremap jk <esc>
|
||||||
inoremap <esc> <nop>
|
inoremap <esc> <nop>
|
||||||
|
|
||||||
# Hide search highlights
|
# Hide search highlights
|
||||||
nnoremap <esc> :noh<cr>
|
nnoremap <bs> :noh<cr>
|
||||||
nnoremap <leader>/ :noh<cr>
|
|
||||||
|
|
||||||
# Switch between recent buffers
|
# Switch between recent buffers
|
||||||
nnoremap <leader><leader> <c-^>
|
nnoremap <leader><leader> <c-^>
|
||||||
|
|
||||||
# Fix shift-semicolon to write
|
# Fix shift-semicolon to colon
|
||||||
noremap ; :
|
noremap ; :
|
||||||
|
|
||||||
# Make it easier to use registers
|
|
||||||
nnoremap ' "
|
|
||||||
|
|
||||||
# I should map these to something useful
|
# I should map these to something useful
|
||||||
inoremap <up> <nop>
|
inoremap <up> <nop>
|
||||||
inoremap <down> <nop>
|
inoremap <down> <nop>
|
||||||
inoremap <left> <nop>
|
inoremap <left> <nop>
|
||||||
inoremap <right> <nop>
|
inoremap <right> <nop>
|
||||||
|
|
||||||
noremap <up> <nop>
|
noremap <up> <nop>
|
||||||
noremap <down> <nop>
|
noremap <down> <nop>
|
||||||
noremap <left> <nop>
|
|
||||||
noremap <right> <nop>
|
# Update almost a decade later: I mapped these to something useful!
|
||||||
|
noremap <left> :cprev<cr>
|
||||||
|
noremap <right> :cnext<cr>
|
||||||
|
|
||||||
# Case control
|
# Case control
|
||||||
nnoremap <leader>u viwU
|
nnoremap <leader>u viwU
|
||||||
|
@ -240,6 +239,8 @@ augroup END
|
||||||
# Use tab for UltiSnips expansion, navigation, and
|
# Use tab for UltiSnips expansion, navigation, and
|
||||||
g:ulti_expand_or_jump_res = 0
|
g:ulti_expand_or_jump_res = 0
|
||||||
g:UltiSnipsExpandOrJumpTrigger = '<tab>'
|
g:UltiSnipsExpandOrJumpTrigger = '<tab>'
|
||||||
|
g:UltiSnipsSnippetStorageDirectoryForUltiSnipsEdit = $DOTFILES_PATH .. "/vim/vim.xdg.symlink/Ultisnips"
|
||||||
|
|
||||||
|
|
||||||
def g:Ultisnips_expand(default: string): string
|
def g:Ultisnips_expand(default: string): string
|
||||||
UltiSnips#ExpandSnippetOrJump()
|
UltiSnips#ExpandSnippetOrJump()
|
||||||
|
|
Loading…
Add table
Reference in a new issue