vim: remap escape on macos; add vim-test
This commit is contained in:
68
vimrc
68
vimrc
@@ -6,6 +6,18 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
"if has("unix") || has("gui_macvim")
|
||||
" let s:uname = system("uname -s")
|
||||
" if s:uname == "Darwin" || has("gui_macvim")
|
||||
" echom "Remapping Escape"
|
||||
" "make jj do esc"
|
||||
" inoremap § <Esc>
|
||||
|
||||
" "make esc do nothing"
|
||||
" inoremap <Esc> <Nop>
|
||||
" endif
|
||||
"endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'junegunn/vim-easy-align/'
|
||||
|
||||
@@ -15,6 +27,8 @@ call plug#begin('~/.vim/plugged')
|
||||
Plug 'junegunn/gv.vim'
|
||||
Plug 'jreybert/vimagit'
|
||||
|
||||
Plug 'janko/vim-test'
|
||||
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
@@ -73,22 +87,6 @@ nnoremap <C-L> viwu
|
||||
nmap <leader>cw y/ <CR>
|
||||
nmap <leader>wp 0v$gq
|
||||
|
||||
augroup filetype_elixir
|
||||
autocmd!
|
||||
autocmd BufRead * imap ii IO.inspect(
|
||||
" autocmd BufRead * imap ip IO.puts(
|
||||
augroup END
|
||||
|
||||
augroup filetype_vue
|
||||
autocmd!
|
||||
autocmd BufRead * imap cll console.log()<Esc>==f(a
|
||||
augroup END
|
||||
|
||||
augroup filetype_javascript
|
||||
autocmd!
|
||||
autocmd BufRead,BufNewFile * imap cll console.log()<Esc>==f(a
|
||||
augroup END
|
||||
|
||||
set ignorecase smartcase
|
||||
set incsearch
|
||||
|
||||
@@ -156,11 +154,11 @@ augroup filetype
|
||||
augroup END
|
||||
|
||||
augroup cppprog
|
||||
au!
|
||||
au BufRead,BufNewFile *.h set cindent
|
||||
au BufRead,BufNewFile *.cc set cindent
|
||||
au BufRead,BufNewFile *.cpp set cindent
|
||||
call TabSize(4)
|
||||
au!
|
||||
au BufRead,BufNewFile *.h set cindent
|
||||
au BufRead,BufNewFile *.cc set cindent
|
||||
au BufRead,BufNewFile *.cpp set cindent
|
||||
call TabSize(4)
|
||||
augroup END
|
||||
|
||||
augroup cprog
|
||||
@@ -170,7 +168,24 @@ augroup cprog
|
||||
augroup END
|
||||
|
||||
" Apply the muttrc colouring to mutt setup files:
|
||||
au BufNewFile,BufRead .mutt.* set ft=muttrc
|
||||
au BufNewFile,BufRead .mutt.* set ft=muttrc
|
||||
|
||||
augroup filetype_elixir
|
||||
autocmd!
|
||||
autocmd BufRead * imap ii IO.inspect(
|
||||
" autocmd BufRead * imap ip IO.puts(
|
||||
augroup END
|
||||
|
||||
augroup filetype_vue
|
||||
autocmd!
|
||||
autocmd BufRead * imap cll console.log()<Esc>==f(a
|
||||
augroup END
|
||||
|
||||
augroup filetype_javascript
|
||||
autocmd!
|
||||
autocmd BufRead,BufNewFile * imap cll console.log()<Esc>==f(a
|
||||
call TabSize(2)
|
||||
augroup END
|
||||
|
||||
" Automatic typo fixing
|
||||
iab compomemt component
|
||||
@@ -186,6 +201,7 @@ map <C-L> :buffers<CR>
|
||||
" paragraph by typing that string!
|
||||
nmap <leader>wp 0v$gq
|
||||
|
||||
" Copy word.
|
||||
nmap <leader>cw y/ <CR>
|
||||
|
||||
" Save
|
||||
@@ -560,3 +576,11 @@ endif
|
||||
|
||||
nmap <Tab> :><CR>
|
||||
vmap <Tab> :><CR>
|
||||
nnoremap <leader>f :Ag <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
" these "Ctrl mappings" work well when Caps Lock is mapped to Ctrl
|
||||
nmap <silent> tN :TestNearest<CR>
|
||||
nmap <silent> tF :TestFile<CR>
|
||||
nmap <silent> tS :TestSuite<CR>
|
||||
nmap <silent> tL :TestLast<CR>
|
||||
nmap <silent> tG :TestVisit<CR>d
|
||||
|
||||
Reference in New Issue
Block a user