updates incl langmap vim

This commit is contained in:
Henrik Bakken
2020-10-12 18:56:47 +02:00
parent 047499ac12
commit 37876cc3ce
+31 -28
View File
@@ -26,7 +26,6 @@ Plug 'liuchengxu/vista.vim' " tags explorer
Plug 'sheerun/vim-polyglot' " language syntax Plug 'sheerun/vim-polyglot' " language syntax
" git " git
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
" markdown " markdown
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } }
Plug 'plasticboy/vim-markdown' " markdown helper. Plug 'plasticboy/vim-markdown' " markdown helper.
@@ -154,17 +153,26 @@ set fillchars=vert:│,stl:\ ,stlnc:\
" KEYBINDS " KEYBINDS
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
let mapleader="\<SPACE>" let mapleader="\<SPACE>"
let maplocalleader=","
nnoremap q: <nop> nnoremap q: <nop>
nnoremap Q <nop> nnoremap Q <nop>
vnoremap v <Esc> vnoremap v <Esc>
nnoremap ø :
nmap <esc><esc> :noh<cr> nmap <esc><esc> :noh<cr>
nnoremap <leader>R :so ~/.config/nvim/init.vim<cr> nmap <leader>R :so ~/.config/nvim/init.vim<cr>
nnoremap <leader>E :tabe ~/.config/nvim/init.vim<cr> nmap <leader>E :tabe ~/.config/nvim/init.vim<cr>
" nerdcommenter: '<leader>c ', '<leader>cl' aligned and '<leader>cu>' remove " nerdcommenter: '<leader>c ', '<leader>cl' aligned and '<leader>cu>' remove
" vim-surround: visual 'SA' to wrap in A. Surround 'csAB' to change from A to B, 'dsA' to remove A. Word 'ysiwA' to wrap with A " vim-surround: visual 'SA' to wrap in A. Surround 'csAB' to change from A to B, 'dsA' to remove A. Word 'ysiwA' to wrap with A
" *****************************
" REMAPPING
set langmap=å(,¨),Å{,^},Ø\\;,ø:,\\;<,:>,æ^
" æ ^
" Ø ;
" ø :
" Å {
" ^ }
" ; <
" : >
" ***************************** " *****************************
" EDITING " EDITING
nmap cr <Plug>(coc-rename) nmap cr <Plug>(coc-rename)
@@ -205,21 +213,11 @@ let g:asterisk#keeppos=1
" ***************************** " *****************************
" CURSOR " CURSOR
" vertical movement remapping ala US
map å [
map ¨ ]
map Å {
map ^ }
" Treat long lines as break lines (useful when moving around in them)
"nmap j gj
"nmap k gk
"vmap j gj
"vmap k gk
" indenting " indenting
nnoremap <Tab> >>_ "nnoremap <Tab> >>_
nnoremap <S-Tab> <<_ "nnoremap <S-Tab> <<_
vnoremap <Tab> >gv "vnoremap <Tab> >gv
vnoremap <S-Tab> <gv "vnoremap <S-Tab> <gv
" Move start and end of line " Move start and end of line
noremap H _ noremap H _
noremap L $ noremap L $
@@ -248,10 +246,10 @@ nnoremap <M-_> :new<cr>
nnoremap <M-t> <C-w>T nnoremap <M-t> <C-w>T
nnoremap <M-T> :tabnew<cr> nnoremap <M-T> :tabnew<cr>
" buffergator " buffergator
nmap <M-N> :bprev<cr> nmap <M-n> :bprev<cr>
nmap <M-n> :bnext<cr> nmap <M-m> :bnext<cr>
nmap <M-M> :tabprev<cr> nmap <M-N> :tabprev<cr>
nmap <M-m> :tabnext<cr> nmap <M-M> :tabnext<cr>
" resize windows with hjkl " resize windows with hjkl
nnoremap <C-h> <C-w>< nnoremap <C-h> <C-w><
nnoremap <C-j> <C-w>- nnoremap <C-j> <C-w>-
@@ -291,10 +289,9 @@ let g:mkdp_preview_options={
" vim-fugitive " vim-fugitive
" g? for fugitive help. :Gdiff, :Gblame, :Gstats '=' expand, '-' add/reset changes, :Gcommit % to commit current file with messag " g? for fugitive help. :Gdiff, :Gblame, :Gstats '=' expand, '-' add/reset changes, :Gcommit % to commit current file with messag
nmap <leader>gg :vertical Gstatus<cr>:vertical resize 60<cr> nmap <leader>gg :vertical Gstatus<cr>:vertical resize 60<cr>
" gv.vim " fzf
map <leader>gv :GV<cr> map <leader>gc :Commits<cr>
map <leader>gf :GV!<cr> map <leader>gf :BCommits<cr>
map <leader>gl :GV?<cr>
" coc git " coc git
nmap <leader>gn <Plug>(coc-git-nextchunk) nmap <leader>gn <Plug>(coc-git-nextchunk)
nmap <leader>gp <Plug>(coc-git-prevchunk) nmap <leader>gp <Plug>(coc-git-prevchunk)
@@ -314,12 +311,18 @@ let g:vista_fzf_preview = ['right:50%']
" ***************************** " *****************************
" POPUPS " POPUPS
" TODO coclist fzf
nmap <M-w> :Ag<cr> nmap <M-w> :Ag<cr>
nmap <silent> <M-z> :CocFzfList<cr>
nmap <silent> <M-g> :CocFzfList symbols<cr> nmap <silent> <M-g> :CocFzfList symbols<cr>
nmap <silent> <M-v> :CocFzfList symbols --kind Variable<cr>
nmap <silent> <M-u> :CocFzfList symbols --kind Function<cr>
nmap <silent> <M-r> :History<cr> nmap <silent> <M-r> :History<cr>
nmap <silent> <M-e> :History/<cr> nmap <silent> <M-e> :History/<cr>
nmap <silent> <M-f> :GFiles<cr> nmap <silent> <M-f> :GFiles<cr>
nmap <silent> <M-F> :Files<cr>
nmap <silent> <M-b> :Buffers<cr>
map <silent> <M-c> :Colors<cr>
map <silent> <M-y> :Filetypes<cr>
let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat
let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never' let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never'