Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
configuration
vim
Commits
086603a0
Commit
086603a0
authored
Nov 16, 2018
by
Adrien Oliva
Browse files
Add <F5> mapping to remove trailing whitespace
parent
ba44ea71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
086603a0
...
...
@@ -51,7 +51,7 @@ endef
define
update-ycm
@(cd
$$(find
$(VIMPATH)/pack/
-name
youcompleteme)
&&
\
git
submodule
update
--init
--recursive
&&
\
git
submodule
update
--init
--recursive
--remote
&&
\
./install.py
--all)
endef
...
...
@@ -102,7 +102,7 @@ hard-files:
prepare-plugin
:
@
git submodule init
@
git submodule update
--recursive
@
git submodule update
--recursive
--remote
plugin-soft
:
prepare-plugin
$(
call
soft-install,
"
$(VIMPATH)
/pack"
,
"
$(PWD)
/pack"
)
...
...
config/06-editor.vim
View file @
086603a0
...
...
@@ -11,3 +11,14 @@ set backspace=indent,eol,start
set
expandtab
set
tabstop
=
4
set
shiftwidth
=
4
function
!
Preserve
(
command
)
" Preparation: save last search and cursor position
let
l
:
winview
=
winsaveview
()
let
l
:
old_query
=
getreg
(
'/'
)
execute
'keepjumps '
.
a:command
call
winrestview
(
l
:
winview
)
call
setreg
(
'/'
,
l
:
old_query
)
endfunction
nmap
<
F5
>
:
call
Preserve
(
'%s/[ \t]*$//'
)<
CR
>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment