]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Map <Leader>t to switch to real tabs.
authorSimon Ruderich <simon@ruderich.org>
Mon, 10 Feb 2014 17:00:18 +0000 (18:00 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 11 Feb 2014 02:07:00 +0000 (03:07 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 6e5e78d91c1e055f3f55aa90498f9ff6564fdad9..0cfc4cb4e5d979df5551e9209ac5193e01d876e2 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -606,6 +606,15 @@ nnoremap <silent> <Leader>8 :8buffer<CR>
 nnoremap <silent> <Leader>9 :9buffer<CR>
 nnoremap <silent> <Leader>0 :10buffer<CR>
 
+" Use real tabs instead of soft tabs.
+if has('eval')
+" Switch from soft tabs to real tabs.
+    function! s:UseTabs()
+        setlocal noexpandtab shiftwidth=8 softtabstop=8
+    endfunction
+    nnoremap <silent> <Leader>t :call <SID>UseTabs()<CR>
+endif
+
 " Make last active window the only window. Similar to <C-W> o.
 nnoremap <C-W>O <C-W>p<C-W>o