Last active
June 15, 2021 13:18
-
-
Save pierot/c8ca7d028aeef6a784bb3b36f4573a7b to your computer and use it in GitHub Desktop.
restant vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plug 'kana/vim-textobj-user' | |
Plug 'kana/vim-textobj-line' | |
Plug 'andyl/vim-textobj-elixir' | |
" Snippets | |
if has('nvim') | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
Plug 'rstacruz/vim-ultisnips-css' | |
endif | |
" == Filetypes ======================================= | |
au BufRead,BufNewFile *.scss set filetype=css | |
au BufRead,BufNewFile *.vue set filetype=html | |
au BufRead,BufNewFile *.go set filetype=go | |
" Line Shortcuts {{{ | |
nnoremap j gj | |
nnoremap k gk | |
nnoremap gV `[v`] | |
" == HTML =============================== | |
map tgt diti<%= gettext("<ESC>p2la<Space>%><ESC> | |
" convert list of lines to <li> | |
map <leader><leader>l :s/\s\+$//e<CR>:'<,'>s/^/<li>/g<CR>:'<,'>s/$/<\/li>/g<CR>:nohl<CR> | |
" == Snippets ====================================================== | |
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. | |
let g:UltiSnipsExpandTrigger="<tab>" | |
let g:UltiSnipsJumpForwardTrigger="<c-j>" | |
let g:UltiSnipsJumpBackwardTrigger="<c-k>" | |
let g:UltiSnipsListSnippets="<c-tab>" | |
if has('nvim') | |
let g:UltiSnipsUsePythonVersion = 2 | |
else | |
let g:UltiSnipsUsePythonVersion = 3 | |
endif | |
" Do not interfere with vim mapping | |
inoremap <c-x><c-k> <c-x><c-k> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment