Commit e79bae9

mo khan <mo@mokhan.ca>
2013-08-11 15:16:11
add markers to vimrc
1 parent 2288903
Changed files (1)
vimrc
@@ -1,6 +1,6 @@
 execute pathogen#infect('bundle/{}', '~/.vim/bundle/colors/{}', '~/.vim/bundle/langs/{}', '~/.vim/bundle/tools/{}')
-""
-"" Basic Setup
+
+"" Basic Settings {{{{
 ""
 
 color ir_black
@@ -28,9 +28,9 @@ set nowritebackup     " do not write a backup
 if $TERM == "xterm-256color" || $TERM == "screen-256color" || $COLORTERM == "gnome-terminal"
   set t_Co=256
 endif
+" }}}
 
-""
-"" Whitespace
+"" Whitespace {{{{
 ""
 
 set nowrap                        " don't wrap lines
@@ -48,17 +48,18 @@ set listchars+=extends:>          " The character to show in the last column whe
                                   " off and the line continues beyond the right of the screen
 set listchars+=precedes:<         " The character to show in the last column when wrap is
                                   " off and the line continues beyond the left of the screen
-""
-"" Searching
+" }}}}
+
+"" Searching {{{{
 ""
 
 set hlsearch    " highlight matches
 set incsearch   " incremental searching
 set ignorecase  " searches are case insensitive...
 set smartcase   " ... unless they contain at least one capital letter
+" }}}}
 
-""
-"" Wild settings
+"" Wild settings {{{{
 ""
 
 set wildmenu
@@ -81,16 +82,16 @@ set wildignore+=*.swp,*~,._*
 
 " Ignore tmp folder, so files and coverage directory.
 set wildignore+=*/tmp/*,*.so,*/coverage/*
+" }}}}
 
-""
-"" Backup and swap files
+"" Backup and swap files {{{{
 ""
 
 set backupdir^=~/.vim/_backup//    " where to put backup files.
 set directory^=~/.vim/_tmp//       " where to put swap files.
+" }}}}
 
-""
-"" Helpers
+"" Helpers {{{{
 ""
 
 " Some file types should wrap their text
@@ -100,9 +101,9 @@ function! s:setupWrapping()
   set textwidth=72
   set nolist
 endfunction
+" }}}}
 
-""
-"" File types
+"" File type-specific settings {{{{
 ""
 
 filetype plugin indent on " Turn on filetype plugins (:help filetype-plugin)
@@ -151,8 +152,13 @@ if has("autocmd")
   autocmd FileType html :iabbrev <buffer> r' &rsquo;
 endif
 
-""
-"" General Mappings (Normal, Visual, Operator-pending)
+augroup filetype_vim
+    autocmd!
+    autocmd FileType vim setlocal foldmethod=marker
+augroup END
+" }}}}
+
+"" General Mappings (Normal, Visual, Operator-pending) {{{{
 ""
 
 let mapleader = ","
@@ -260,8 +266,9 @@ vmap <localleader>/ <leader>c<space>
 " BufferGator
 nnoremap <localleader>b :BuffergatorOpen<cr>
 
-""
-"" Command-Line Mappings
+" }}}}
+
+"" Command-Line Mappings {{{{
 ""
 
 " After whitespace, insert the current directory into a command-line path
@@ -270,10 +277,10 @@ cnoremap <expr> <C-P> getcmdline()[getcmdpos()-2] ==# ' ' ? expand('%:p:h') : "\
 " Kills Trailing Whitespaces
 command! KillWhitespace :normal :%s/ *$//g<cr><c-o><cr>
 
+" }}}
 
-"""
-""" Status Line
-"""
+"" Status Line {{{{
+""
 
 if has("statusline") && !&cp
   set laststatus=2  " always show the status bar
@@ -288,9 +295,9 @@ if has("statusline") && !&cp
   set statusline+=/                 " separator
   set statusline+=%04L]             " total lines
 endif
+" }}}}
 
-""
-"" Abbreviations
+"" Abbreviations {{{{
 ""
 
 iabbrev adn and
@@ -298,9 +305,9 @@ iabbrev waht what
 iabbrev teh the
 iabbrev tehn then
 iabbrev @@ mo@mokhan.ca
+" }}}}
 
-""
-"" Plugin Configuration
+"" Plugin Configuration {{{{
 ""
 
 "let g:ctrlp_map = '<leader>t'
@@ -313,3 +320,4 @@ let g:ctrlp_custom_ignore = {
 let g:ctrlp_working_path_mode = 0
 let g:ctrlp_dotfiles = 0
 let g:ctrlp_switch_buffer = 0
+" }}}}