Stop cursor jump that can happen when removing trailing spaces during a vim save
This commit is contained in:
parent
30bb9e7764
commit
1b9f280203
|
@ -105,3 +105,25 @@ ethernet
|
||||||
Cancelled
|
Cancelled
|
||||||
indie
|
indie
|
||||||
etc
|
etc
|
||||||
|
texel
|
||||||
|
Subpixel
|
||||||
|
texels
|
||||||
|
subpixel
|
||||||
|
blitting
|
||||||
|
shaders
|
||||||
|
rasterizer
|
||||||
|
subsampled
|
||||||
|
downsample
|
||||||
|
performant
|
||||||
|
devs
|
||||||
|
LUT
|
||||||
|
realtime
|
||||||
|
tradeoff
|
||||||
|
params
|
||||||
|
param
|
||||||
|
toolset
|
||||||
|
bootsector
|
||||||
|
bootable
|
||||||
|
virtualized
|
||||||
|
VM
|
||||||
|
multithreading
|
||||||
|
|
Binary file not shown.
14
vimrc
14
vimrc
|
@ -187,7 +187,7 @@ set incsearch " Highlight matches as you type
|
||||||
set hlsearch " Highlight matches
|
set hlsearch " Highlight matches
|
||||||
set dictionary+=/usr/share/dict/words
|
set dictionary+=/usr/share/dict/words
|
||||||
"set clipboard=unnamed " yank and paste with the system clipboard
|
"set clipboard=unnamed " yank and paste with the system clipboard
|
||||||
set relativenumber " Use realtive line numebrs
|
set nonumber
|
||||||
" make searches case-sensitive only if they contain upper-case characters
|
" make searches case-sensitive only if they contain upper-case characters
|
||||||
set ignorecase smartcase
|
set ignorecase smartcase
|
||||||
set visualbell " No bell sounds
|
set visualbell " No bell sounds
|
||||||
|
@ -257,9 +257,6 @@ if has('persistent_undo')
|
||||||
set undofile
|
set undofile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Remove trailing whitespace on save all files.
|
|
||||||
au BufWritePre * :%s/\s\+$//e
|
|
||||||
|
|
||||||
" Fix vim's background colour erase - http://snk.tuxfamily.org/log/vim-256color-bce.html
|
" Fix vim's background colour erase - http://snk.tuxfamily.org/log/vim-256color-bce.html
|
||||||
if &term =~ '256color'
|
if &term =~ '256color'
|
||||||
" Disable Background Color Erase (BCE) so that color schemes
|
" Disable Background Color Erase (BCE) so that color schemes
|
||||||
|
@ -310,6 +307,15 @@ augroup campoCmds
|
||||||
autocmd BufWritePost *.vim so $MYVIMRC
|
autocmd BufWritePost *.vim so $MYVIMRC
|
||||||
autocmd BufWritePost vimrc.symlink so $MYVIMRC
|
autocmd BufWritePost vimrc.symlink so $MYVIMRC
|
||||||
|
|
||||||
|
" Remove trailing whitespace on save all files.
|
||||||
|
function! <SID>StripTrailingWhitespaces()
|
||||||
|
let l = line(".")
|
||||||
|
let c = col(".")
|
||||||
|
%s/\s\+$//e
|
||||||
|
call cursor(l, c)
|
||||||
|
endfun
|
||||||
|
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
|
||||||
|
|
||||||
"////////////////////////////////////////////////////////////////
|
"////////////////////////////////////////////////////////////////
|
||||||
" FILE TEMPLATES
|
" FILE TEMPLATES
|
||||||
"////////////////////////////////////////////////////////////////
|
"////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue
Block a user