summaryrefslogtreecommitdiff
path: root/keys
diff options
context:
space:
mode:
Diffstat (limited to 'keys')
-rw-r--r--keys/mappings.vim4
-rw-r--r--keys/which-key.vim23
2 files changed, 27 insertions, 0 deletions
diff --git a/keys/mappings.vim b/keys/mappings.vim
index 71776b08..79311e5f 100644
--- a/keys/mappings.vim
+++ b/keys/mappings.vim
@@ -1,3 +1,7 @@
+" Leader key
+let mapleader=" "
+let localleader=" "
+nnoremap <Space> <Nop>
" Better indenting
vnoremap < <gv
diff --git a/keys/which-key.vim b/keys/which-key.vim
new file mode 100644
index 00000000..2cf2e48e
--- /dev/null
+++ b/keys/which-key.vim
@@ -0,0 +1,23 @@
+" map leader to which_key
+" call which_key#register('<Space>', "g:which_key_map")
+
+nnoremap <silent> <leader> :silent WhichKey ' '<CR>
+
+" Not a fan of floating windows for this
+let g:which_key_use_floating_win = 0
+
+" highlight default link WhichKey Function
+" highlight default link WhichKeySeperator DiffAdded
+" highlight default link WhichKeyGroup Keyword
+" highlight default link WhichKeyDesc Identifier
+
+highlight default link WhichKey Operator
+highlight default link WhichKeySeperator DiffAdded
+highlight default link WhichKeyGroup Identifier
+highlight default link WhichKeyDesc Function
+
+" Hide status line
+autocmd! FileType which_key
+autocmd FileType which_key set laststatus=0 noshowmode noruler
+ \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
+