summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:04:30 -0500
committerJason Linehan <jlinehan@pathwaysystems.com>2013-12-19 12:04:30 -0500
commit1105426c56a6544432e4a8f459d069292e198253 (patch)
tree045ec23490d1f324ca5f91ac7cfa8cc33c2275d4
parentf95b671b5d8f16b4f6a5f930d51764cd494d0198 (diff)
Misc commits on Pathway development machine
-rw-r--r--default.vimrc19
1 files changed, 17 insertions, 2 deletions
diff --git a/default.vimrc b/default.vimrc
index 0e18266..41b5785 100644
--- a/default.vimrc
+++ b/default.vimrc
@@ -52,7 +52,7 @@
" t - Auto-wrap text using textwidth
autocmd FileType make " When editing a Makefile...
\setlocal noexpandtab " always insert hard tabs
-" filetype plugin indent on " enable filetype plugins and indentation
+ filetype plugin indent on " enable filetype plugins and indentation
" Pattern matching
" `````````````````````````````````````````````````````````````````````````````
@@ -66,6 +66,10 @@
set showmatch " Jump to matching bracket
set matchtime=3 " Duration of matching bracket highlight
+" Folding
+" `````````````````````````````````````````````````````````````````````````````
+ set foldmethod=indent
+
" Temporary files (.swp)
" `````````````````````````````````````````````````````````````````````````````
" Automatically create .backup directory, writable by the group.
@@ -118,11 +122,12 @@
noremap <Leader>7 <Esc>:call <SID>ToggleFormatColumn()<CR>
" Close a buffer
- noremap <Leader><F1> <Esc>:call CleanClose(1)<CR>
+ noremap <Leader>1 <Esc>:call CleanClose(1)<CR>
" Set 4-space tabs
noremap <Leader>p <Esc>:set softtabstop=4 shiftwidth=4 expandtab<CR>
noremap <Leader>s :Gstatus<CR>
noremap <Leader>c :Gcommit<CR>
+
" =============================================================================
@@ -240,7 +245,17 @@ endfunction
" Define a command to make it easier to use
command! -nargs=+ Each call Each(<q-args>)
+""
+" R()
+" `````
+" Replace the word under the cursor with another string
+" @replace_with: Word to replace <cword>
+function! R(replace_with)
+ execute ":%s/" . expand("<cword>") . "/" . a:replace_with . "/gc"
+endfunction
+" Define a command to make it easier to use
+command! -nargs=+ R call R(<q-args>)
" =============================================================================