summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:14:04 -0500
committerJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:14:04 -0500
commitdf5e0b710387cc148bf3884481db25fe99f5f958 (patch)
treea5680f8d444cff59ac2e8429e9e7fa9244dfdaea
parentea98755a1696f4909bc6a360293c96fbe01a2249 (diff)
Corrected CycleTabStop() function
-rw-r--r--default.vimrc8
1 files changed, 5 insertions, 3 deletions
diff --git a/default.vimrc b/default.vimrc
index a409a66..af3735a 100644
--- a/default.vimrc
+++ b/default.vimrc
@@ -125,7 +125,7 @@
" Close a buffer
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>p <Esc>:call CycleTabStop()<CR>
noremap <Leader>s :Gstatus<CR>
noremap <Leader>c :Gcommit<CR>
@@ -177,12 +177,14 @@
" VIMSCRIPTS
" =============================================================================
" CycleTabStop()
-" `````````````````````````````````````````````````````````````````````````````
+" `````````````````````````````````````````````````````````````````````````````
function! CycleTabStop()
- if (g:tabstop == 8)
+ if (&tabstop == 8)
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
+ echo "4-space tabs"
else
set tabstop=8 softtabstop=8 shiftwidth=8 expandtab
+ echo "8-space tabs"
endif
endfunction