summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vimrc104
l---------after/ftplugin/eruby.vim1
-rw-r--r--after/ftplugin/python.vim4
-rw-r--r--after/ftplugin/ruby.vim8
4 files changed, 61 insertions, 56 deletions
diff --git a/.vimrc b/.vimrc
index 9df964f..4816fb5 100644
--- a/.vimrc
+++ b/.vimrc
@@ -58,51 +58,51 @@ colorscheme xoria256 "set colorscheme
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vim variables
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-set encoding=utf-8 " set the encoding to utf-8
-set t_Co=256 " set terminal color 265
-set clipboard=unnamed " fix not copying between clipboard and vim
-set backspace=indent,eol,start " fix backspace not deleteing existing text
-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 encoding=utf-8 " set the encoding to utf-8
+set t_Co=256 " set terminal color 265
+set clipboard=unnamed " fix not copying between clipboard and vim
+set backspace=indent,eol,start " fix backspace not deleteing existing text
+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 (causes problems having differnt files indentation)
set smarttab
-set softtabstop=2 " indentation
-set tabstop=2 " indentation
-set shiftwidth=2 " indentation
-set expandtab " convert tabs to spaces
-set ttyscroll=3 " speed up scrolling
-set ttyfast " Optimize for fast terminal connections
-set lazyredraw " to avoid scrolling problems
-"set ttimeout " less timeout for faster navigation
-"set ttimeoutlen=100 " time out for faster navigation
-set incsearch " Make search act like search in modern browsers
-set ignorecase " Ignore case when searching shortend ic
-" set noignorecase " Case Senetive searching shortend noic
-set smartcase " case-sensitive search if any caps
-set hlsearch " Highlight search things shortend hls or nohls
-set laststatus=2 " Always show the status line
-set ruler " Always show current position
-set showcmd " display incomplete commands
-set wildmenu " Turn on Wild menu
-set wildignore=*.o,*~,*.pyc " Ignore compiled files
+set softtabstop=2 " indentation
+set tabstop=2 " indentation
+set shiftwidth=2 " indentation
+set expandtab " convert tabs to spaces
+set ttyscroll=3 " speed up scrolling
+set ttyfast " Optimize for fast terminal connections
+set lazyredraw " to avoid scrolling problems
+" set ttimeout " less timeout for faster navigation
+" set ttimeoutlen=100 " time out for faster navigation
+set incsearch " Make search act like search in modern browsers
+set ignorecase " Ignore case when searching shortend ic
+" set noignorecase " Case Senetive searching shortend noic
+set smartcase " case-sensitive search if any caps
+set hlsearch " Highlight search things shortend hls or nohls
+set laststatus=2 " Always show the status line
+set ruler " Always show current position
+set showcmd " display incomplete commands
+set wildmenu " Turn on Wild menu
+set wildignore=*.o,*~,*.pyc " Ignore compiled files
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
-set undofile " Save undo's after file closes
-set undodir=$HOME/.vim/undo " where to save undo histories
-set undolevels=200 " How many undos
-set undoreload=200 " number of lines to save for undo
-set fileformats+=mac " correct mac file format
-set tabpagemax=50 " Set the maximum number of tabs allowed
-set modelines=0 " disable the modelines which i don't understand
-set nomodeline " disable the modelines which i don't understand
-set lbr " Vim to wrap existing text as desired
-set nowrap " let Vim Wrap lines or leave them as long as they get
+set undofile " Save undo's after file closes
+set undodir=$HOME/.vim/undo " where to save undo histories
+set undolevels=200 " How many undos
+set undoreload=200 " number of lines to save for undo
+set fileformats+=mac " correct mac file format
+set tabpagemax=50 " Set the maximum number of tabs allowed
+set modelines=0 " disable the modelines which i don't understand
+set nomodeline " disable the modelines which i don't understand
+set lbr " Vim to wrap existing text as desired
+set nowrap " let Vim Wrap lines or leave them as long as they get
set noeb vb t_vb=
-" set cursorline " highlight current line
-" set nocursorline " don't highlight current line
-set splitbelow " position the preview window below current windows
-set mouse=a " enable mouse movements, default set mouse=
+" set cursorline " highlight current line
+" set nocursorline " don't highlight current line
+set splitbelow " position the preview window below current windows
+set mouse=a " enable mouse movements, default set mouse=
" set vim startup faster
if !empty(&viminfo)
@@ -146,20 +146,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>
diff --git a/after/ftplugin/eruby.vim b/after/ftplugin/eruby.vim
new file mode 120000
index 0000000..af11168
--- /dev/null
+++ b/after/ftplugin/eruby.vim
@@ -0,0 +1 @@
+ruby.vim \ No newline at end of file
diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim
new file mode 100644
index 0000000..e847d12
--- /dev/null
+++ b/after/ftplugin/python.vim
@@ -0,0 +1,4 @@
+setlocal tabstop=8
+setlocal expandtab
+setlocal shiftwidth=4
+setlocal softtabstop=4
diff --git a/after/ftplugin/ruby.vim b/after/ftplugin/ruby.vim
new file mode 100644
index 0000000..ad4ed03
--- /dev/null
+++ b/after/ftplugin/ruby.vim
@@ -0,0 +1,8 @@
+set omnifunc=rubycomplete#Complete
+let g:rubycomplete_buffer_loading = 1
+let g:rubycomplete_rails = 1
+let g:rubycomplete_classes_in_global = 1
+let g:rubycomplete_include_object = 1
+let g:rubycomplete_include_objectspace = 1
+setlocal spell " allow spell checking for ruby documentation
+set complete+=k " allow spell autocompletion using CTRL-N