summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2021-04-18 00:35:32 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2021-04-18 00:35:32 +0200
commit62eecba6ade7a2679787033d5d5250ba799f9d76 (patch)
tree435cd31a827c9120c0acf0f614dedfa8983a4c7d
parent7fa0b2742ebcdeebc83fd315ea35b0ce3b28b8bd (diff)
nvim: better whitespace cleaner
-rw-r--r--nvim/nvim/init.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/nvim/nvim/init.vim b/nvim/nvim/init.vim
index e11f18a..032f372 100644
--- a/nvim/nvim/init.vim
+++ b/nvim/nvim/init.vim
@@ -116,7 +116,9 @@ function TrimWhiteSpace()
%s/\s*$//
''
:endfunction
+" Whitexpace trimmer available in normal and edit mode
nnoremap <F2> :call TrimWhiteSpace()<CR>
+inoremap <F2> <ESC>:call TrimWhiteSpace()<CR>
" Default tabs
set tabstop=4 softtabstop=0 expandtab shiftwidth=4