Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clean up and improve vimrc

  • Loading branch information...
commit fcbbdc9a4e034083da24ac6e85f0fbea4d3c2367 1 parent 47d52e5
Nathan Eror authored

Showing 1 changed file with 39 additions and 20 deletions. Show diff stats Hide diff stats

  1. 59  vimrc
59  vimrc
@@ -43,23 +43,27 @@ nnoremap Q gqap
43 43
 "and to relfow a selected block in visual mode
44 44
 vnoremap Q gq
45 45
 
  46
+"Make the spacebar do something useful in normal mode
  47
+nnoremap <Space> viw
  48
+
46 49
 "Clear the search pattern
47  
-set hlsearch
48  
-nnoremap <Leader>s :let @/ = ""<CR>
  50
+set nohlsearch
  51
+nnoremap <Leader>sh :set hlsearch!<CR>
  52
+nnoremap <Leader>ss :let @/ = ""<CR>
49 53
 
50 54
 "Taglist plugin
51 55
 let Tlist_Ctags_Cmd = "/usr/local/bin/ctags"
52  
-nmap <Leader>z :TlistToggle<CR>
  56
+nnoremap <Leader>z :TlistToggle<CR>
53 57
 
54 58
 "NERDTree plugin
55  
-nmap <Leader>n :NERDTreeToggle<CR>
  59
+nnoremap <Leader>n :NERDTreeToggle<CR>
56 60
 
57 61
 if has("mac")
58 62
   "For Marked.app MultiMarkdown preview
59 63
   :nnoremap <leader>m :silent !open -a Marked.app '%:p'<cr>
60 64
   
61 65
   "MultiMarkdown utlility mappings
62  
-  vmap K !~/Library/Application\ Support/MultiMarkdown/Utilities/table_cleanup.pl<cr>
  66
+  vnoremap K !~/Library/Application\ Support/MultiMarkdown/Utilities/table_cleanup.pl<cr>
63 67
   if exists("*togglebg")
64 68
     "Map light/dark background toggle for Solarized
65 69
     call togglebg#map("<F5>")
@@ -69,34 +73,49 @@ endif
69 73
 "Set author name for snipMate
70 74
 let g:snips_author = 'Nathan Eror'
71 75
 
72  
-"autocmd BufWinLeave *.rst mkview
73  
-"autocmd BufWinEnter *.rst Vst fold
74  
-"autocmd BufWinEnter *.rst set foldlevel=1
75  
-autocmd BufRead,BufNewFile *.rst set textwidth=140
  76
+augroup filetype_rst
  77
+	autocmd!
  78
+	"autocmd BufWinLeave *.rst mkview
  79
+	"autocmd BufWinEnter *.rst Vst fold
  80
+	"autocmd BufWinEnter *.rst set foldlevel=1
  81
+	autocmd BufRead,BufNewFile *.rst set textwidth=140
  82
+augroup END
76 83
 
77 84
 "tell vim about pml files
78  
-autocmd BufRead,BufNewFile *.pml set spell
79  
-autocmd BufRead,BufNewFile *.pml set filetype=pml
80  
-autocmd BufRead,BufNewFile *.pml set nonumber
81  
-autocmd BufRead,BufNewFile *.pml set textwidth=140
82  
-autocmd	BufRead,BufNewFile *.pml map <Leader>b :!./rake clean no-workflow %<.pdf;open %<.pdf<CR> 
  85
+augroup filetype_pml
  86
+	autocmd!
  87
+	autocmd BufRead,BufNewFile *.pml set spell
  88
+	autocmd BufRead,BufNewFile *.pml set filetype=pml
  89
+	autocmd BufRead,BufNewFile *.pml set nonumber
  90
+	autocmd BufRead,BufNewFile *.pml set textwidth=140
  91
+	autocmd	BufRead,BufNewFile *.pml noremap <LocalLeader>b :!./rake clean no-workflow %<.pdf;open %<.pdf<CR> 
  92
+augroup END
83 93
 
84 94
 "tell vim about jinja files
85  
-autocmd BufRead,BufNewFile *.j2 set filetype=htmljinja
  95
+augroup filetype_htmljinja
  96
+	autocmd!
  97
+	autocmd BufRead,BufNewFile *.j2 set filetype=htmljinja
  98
+augroup END
86 99
 
87  
-"Unity C# compiler pligin
88  
-autocmd BufRead,BufNewFile *.cs compiler unitycs
  100
+"Unity C# compiler plugin
  101
+augroup filetype_unitycs
  102
+	autocmd!
  103
+	autocmd BufRead,BufNewFile *.cs compiler unitycs
  104
+augroup END
89 105
 
90 106
 let g:xml_syntax_folding = 1
91 107
 "let xml_jump_string = "Ç"
92 108
 
93 109
 "tslime keymaps
94  
-vmap <C-c><C-c> <Plug>SendSelectionToTmux
95  
-nmap <C-c><C-c> <Plug>NormalModeSendToTmux
96  
-nmap <C-c>r <Plug>SetTmuxVars
  110
+vnoremap <C-c><C-c> <Plug>SendSelectionToTmux
  111
+nnoremap <C-c><C-c> <Plug>NormalModeSendToTmux
  112
+nnoremap <C-c>r <Plug>SetTmuxVars
97 113
 
98 114
 "Powerline
99 115
 let g:Powerline_symbols = 'fancy'
100 116
 
101 117
 helptags ~/.vim/doc/
102 118
 
  119
+"Quick 'macro' mappings
  120
+nnoremap <leader>vs :vsplit $MYVIMRC<cr>
  121
+nnoremap <leader>ve :source $MYVIMRC<cr>

0 notes on commit fcbbdc9

Please sign in to comment.
Something went wrong with that request. Please try again.