aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-05-18 16:13:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-05-18 16:15:01 +1200
commit641a96bc1274d4be8dace8e034fc1abbea252c25 (patch)
tree7f0ef16b2e60b366ed746952bb855dbaa3f6fa7d
parentRebind Space in Vim normal mode to scroll (diff)
downloaddotfiles-641a96bc1274d4be8dace8e034fc1abbea252c25.tar.gz
dotfiles-641a96bc1274d4be8dace8e034fc1abbea252c25.zip
Toggle Vim 'list', 'number' and 'wrap' globally
No particular reason beyond preference; I think of these as properties of the window itself, not the window-buffer pair, so it makes more sense to me this way.
-rw-r--r--vim/config/display.vim4
-rw-r--r--vim/config/wrap.vim2
2 files changed, 3 insertions, 3 deletions
diff --git a/vim/config/display.vim b/vim/config/display.vim
index 43889c1a..8b3bcf24 100644
--- a/vim/config/display.vim
+++ b/vim/config/display.vim
@@ -32,10 +32,10 @@ set shortmess+=x
set nolist
nnoremap <silent>
\ <Leader>l
- \ :<C-U>setlocal list! list?<CR>
+ \ :<C-U>set list! list?<CR>
" Don't show line numbers by default, but \n toggles them
set nonumber
nnoremap <silent>
\ <Leader>n
- \ :<C-U>setlocal number! number?<CR>
+ \ :<C-U>set number! number?<CR>
diff --git a/vim/config/wrap.vim b/vim/config/wrap.vim
index a90c2765..a2d442fa 100644
--- a/vim/config/wrap.vim
+++ b/vim/config/wrap.vim
@@ -2,7 +2,7 @@
set nowrap
nnoremap <silent>
\ <Leader>w
- \ :<C-U>setlocal wrap! wrap?<CR>
+ \ :<C-U>set wrap! wrap?<CR>
" When wrapping text, if a line is so long that not all of it can be shown on
" the screen, show as much as possible anyway; by default Vim fills the left