Make this thingy work properly
22652870021e52361d9223860fc55197561db838
1 parent
c26d1c50
.vimrc
+6 -1
| 79 | 79 | return !col || getline('.')[col - 1] =~ '\s' |
|
| 80 | 80 | endfunction |
|
| 81 | 81 | endif |
|
| 82 | 82 | ||
| 83 | 83 | " Save on focus lost |
|
| 84 | - | au FocusLost * :wa |
|
| 84 | + | au FocusLost * call s:SaveOnFocusLost() |
|
| 85 | + | function! s:SaveOnFocusLost() |
|
| 86 | + | if !empty(expand('%:p')) |
|
| 87 | + | write |
|
| 88 | + | endif |
|
| 89 | + | endfunction |
|
| 85 | 90 | ||
| 86 | 91 | " Per file-type indentation |
|
| 87 | 92 | au FileType haskell set sts=4 sw=4 expandtab |
|
| 88 | 93 | au FileType javascript set sts=4 sw=4 expandtab |
|
| 89 | 94 | au FileType go set ts=4 sw=4 noexpandtab |