Browse Source

Add prompt bindings and update vimrc

master
= 4 years ago
parent
commit
11dcc8f72d
2 changed files with 42 additions and 12 deletions
  1. +36
    -9
      vimrc.local
  2. +6
    -3
      xbindkeysrc

+ 36
- 9
vimrc.local View File

@@ -26,9 +26,6 @@ colorscheme base16-ocean
"Pymode stuff
let g:pymode_folding = 0

"Easymotion prefix
map <Leader> <Plug>(easymotion-prefix)

" turn hybrid line numbers off
":set nonumber norelativenumber
":set nonu nornu
@@ -46,12 +43,12 @@ map <Leader> <Plug>(easymotion-prefix)

"CtrlP bindings
nmap <leader>d :CtrlPBuffer<cr>
nmap <leader>a :CtrlPMRU<cr>
nmap <leader>l :CtrlPLine<cr>
nmap <leader>m :CtrlPMRU<cr>
nmap <leader>L :CtrlPLine<cr>

"NERDTree bingings
nnoremap <F1> :NERDTreeToggle<cr>
nnoremap <leader>t :NERDTreeToggle<cr>
nnoremap <leader>t :NERDTreeFind<cr>
nnoremap <F2> :NERDTreeFocus<cr>
"autocmd vimenter * NERDTree

@@ -69,7 +66,6 @@ nnoremap <F4> :tabnext<cr>
nnoremap <F5> :buffers<CR>:buffer<Space>
noremap <BS> <PageUp>
noremap <Space> <PageDown>
noremap <leader>o o<Esc>k
nmap <leader>p <C-w><C-r>
noremap <leader>y <C-W>w
noremap <C-h> <C-W>h
@@ -77,9 +73,23 @@ noremap <C-l> <C-W>l
noremap <C-j> <C-W>j
noremap <C-k> <C-W>k
nnoremap <leader>z :wa<cr>
nnoremap - :w<cr>
set so=10

"Easymotion
map <Leader> <Plug>(easymotion-prefix)
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
map <leader>ls <Plug>(easymotion-sl)
map <leader>lf <Plug>(easymotion-bd-fl)
map <leader>lw <Plug>(easymotion-bd-wl)
map <leader>ol <Plug>(easymotion-overwin-line)
map <leader>ow <Plug>(easymotion-overwin-w)
nmap <leader>of <Plug>(easymotion-overwin-f2)
nmap <leader>aw <Plug>(easymotion-bd-w)
nmap <leader>al <Plug>(easymotion-bd-jk)

"Copy and pasting
vmap <C-c> "+y
nmap <S-y> "+p
@@ -175,10 +185,27 @@ let vimsyn_folding='af' " Vim script
let xml_syntax_folding=1 " XML

"ctrlp and buffgator custom stuff
let g:ctrlp_switch_buffer = 'E'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site|node_modules)$',
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
\}
let g:ctrlp_working_path_mode = 'r' " Use the nearest .git directory as the cwd
let g:buffergator_viewport_split_policy = 'R' " Use the right side of the screen
let g:buffergator_suppress_keymaps = 1 " I want my own keymappings...

"Programming specific
"let g:auto_save_postsave_hook = 'silent !npx browser-sync reload &'
" let g:go_def_mode='gopls'
" let g:go_info_mode='gopls'

"NNN
"let g:nnn#layout = { 'left': '~20%' } " or right, up, down
let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
let g:nnn#action = {
\ '<c-t>': 'tab split',
\ '<c-x>': 'split',
\ '<c-v>': 'vsplit' }
let $NNN_BMS='h:~/;c:~/.config;n:~/Notes;'
let $NNN_PLUG='p:preview-tui;c:x2sel;i:imgview;s:tmspawn'
"let $NNN_FIFO=/tmp/nnn.fifo

+ 6
- 3
xbindkeysrc View File

@@ -14,8 +14,11 @@
"pactl set-source-mute @DEFAULT_SOURCE@ toggle"
Mod4 + F9

"app-launch"
"prompt launch"
Mod4 + g

"do-action"
Mod4 + e
"prompt action"
Mod4 + a

"prompt ddg"
Mod4 + r

Loading…
Cancel
Save