summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:02:49 -0500
committerJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:02:49 -0500
commit2c1d155cffbbc5ce2483f048a68593ccc06a603e (patch)
tree7e2dcc2caa0d60cb977608781e64be68fcfcbfe4
parentf95b671b5d8f16b4f6a5f930d51764cd494d0198 (diff)
Changed tab switching to CycleTabStop function
-rw-r--r--default.vimrc17
1 files changed, 14 insertions, 3 deletions
diff --git a/default.vimrc b/default.vimrc
index 0e18266..6c3b82f 100644
--- a/default.vimrc
+++ b/default.vimrc
@@ -53,6 +53,7 @@
autocmd FileType make " When editing a Makefile...
\setlocal noexpandtab " always insert hard tabs
" filetype plugin indent on " enable filetype plugins and indentation
+ set foldmethod=indent
" Pattern matching
" `````````````````````````````````````````````````````````````````````````````
@@ -118,9 +119,9 @@
noremap <Leader>7 <Esc>:call <SID>ToggleFormatColumn()<CR>
" Close a buffer
- noremap <Leader><F1> <Esc>:call CleanClose(1)<CR>
-" Set 4-space tabs
- noremap <Leader>p <Esc>:set softtabstop=4 shiftwidth=4 expandtab<CR>
+ noremap <Leader>1 <Esc>:call CleanClose(1)<CR>
+" Cycle between 4- and 8-space tabs
+ noremap <Leader>p <Esc>:call <SID>CycleTabStop()<CR>
noremap <Leader>s :Gstatus<CR>
noremap <Leader>c :Gcommit<CR>
" =============================================================================
@@ -170,6 +171,16 @@
" VIMSCRIPTS
" =============================================================================
+" CycleTabStop()
+" `````````````````````````````````````````````````````````````````````````````
+ function! CycleTabStop()
+ if (g:tabstop == 8)
+ set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
+ else
+ set tabstop=8 softtabstop=8 shiftwidth=8 expandtab
+ endif
+ endfunction
+
" ToggleColorColumn()
" `````````````````````````````````````````````````````````````````````````````
hi ColorColumn ctermbg=108