mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-09 09:31:14 +10:00
Merge branch 'master' into 'master'
Removes trailing spaces automatically + (optional minimalist auto completer) See merge request dwt1/dotfiles!10
This commit is contained in:
@@ -188,4 +188,18 @@ set guioptions-=L "remove left-hand scroll bar
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
set fillchars+=vert:\
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"=> Trailing spaces
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
function! CleanExtraSpaces() "Function to clean unwanted spaces
|
||||
let save_cursor = getpos(".")
|
||||
let old_query = getreg('/')
|
||||
silent! %s/\s\+$//e
|
||||
call setpos('.', save_cursor)
|
||||
call setreg('/', old_query)
|
||||
endfun
|
||||
|
||||
|
||||
autocmd BufWritePre * :call CleanExtraSpaces()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user