Permalink
Browse files

add comments at the beginning of the line

  • Loading branch information...
1 parent d1b73c7 commit f455b199480615ee3e438c2a6a98e2ac722c72b9 @newellista newellista committed Apr 5, 2012
Showing with 10 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +9 −2 .vimrc
View
@@ -1 +1,2 @@
*.swp
+.netrwhist
View
11 .vimrc
@@ -114,17 +114,24 @@ augroup filetype_js
autocmd!
autocmd FileType javascript setlocal number
" Comment line of code
- autocmd FileType javascript nnoremap <buffer> <localleader>c I//
+ autocmd FileType javascript nnoremap <buffer> <localleader>c 0i//<esc>
" autocmd BufWrite,BufRead *.js :normal gg=G
augroup END
+augroup filetype_php
+ autocmd!
+ autocmd FileType php setlocal number
+ " Comment line of code
+ autocmd FileType php nnoremap <buffer> <localleader>c 0i//<esc>
+augroup END
+
" Ruby autocmd's
augroup filetype_ruby
autocmd!
autocmd FileType ruby setlocal number
" Comment line of code
- autocmd FileType ruby nnoremap <buffer> <localleader>c I#
+ autocmd FileType ruby nnoremap <buffer> <localleader>c 0i#<esc>
" reformat entire file on read/write
" autocmd BufWrite,BufRead *.rb :normal gg=G

0 comments on commit f455b19

Please sign in to comment.