summaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2019-11-15 17:10:16 +0100
committerAhmed Abdelhalim <[email protected]>2019-11-15 17:10:16 +0100
commit51b67bb5a07ee3eaab080c14a8b01dc43c52c21f (patch)
treee50e9597a1fc692f2bb9da42b697c0f90cac80e3 /.vimrc
parent1ae3ed9d49c2400c5411c0439c975f64d91b70de (diff)
Add filetype specific indentations
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc22
1 files changed, 7 insertions, 15 deletions
diff --git a/.vimrc b/.vimrc
index fab5c5a..0a44e8c 100644
--- a/.vimrc
+++ b/.vimrc
@@ -67,7 +67,7 @@ set number " set numbers column on the left
set complete-=i " Faster vim completion
set nrformats-=octal " Increment numbers decimally using Ctrl+A and Ctrl+X
set autoindent " Auto indent
-set smartindent " Smart indet
+" set smartindent " Smart indet (causes problems having differnt files indentation)
set smarttab
set softtabstop=2 " indentation
set tabstop=2 " indentation
@@ -147,20 +147,12 @@ set omnifunc=pythoncomplete#Complete
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Specific FileTypes configurations
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
-autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
-autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
-autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
-autocmd FileType ruby,eruby let g:rubycomplete_include_object = 1
-autocmd FileType ruby,eruby let g:rubycomplete_include_objectspace = 1
-autocmd FileType ruby,eruby setlocal spell " allow spell checking for ruby documentation
-autocmd FileType ruby,eruby set complete+=k " allow spell autocompletion using CTRL-N
-autocmd BufNewFile,BufRead *.html.erb set filetype=html " for ruby erb template files
-autocmd BufNewFile,BufRead *.json.jbuilder set filetype=ruby " for ruby json template files
-autocmd BufRead,BufNewFile *.md setlocal spell " spell check md files
-autocmd BufRead,BufNewFile *.markdown setlocal spell " spell check md files
-autocmd FileType gitcommit setlocal spell " spell check commits
-autocmd FileType gitcommit set complete+=k " allow spell autocompletion using CTRL-N
+autocmd BufNewFile,BufRead *.html.erb set filetype=html " for ruby erb template files
+autocmd BufNewFile,BufRead *.json.jbuilder set filetype=ruby " for ruby json template files
+autocmd BufRead,BufNewFile *.md setlocal spell " spell check md files
+autocmd BufRead,BufNewFile *.markdown setlocal spell " spell check md files
+autocmd FileType gitcommit setlocal spell " spell check commits
+autocmd FileType gitcommit set complete+=k " allow spell autocompletion using CTRL-N
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr>
autocmd FileType json noremap <buffer> <c-f> :call JsonBeautify()<cr>
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>