dotfiles/vim/.vimrc
2017-07-04 20:16:36 +02:00

100 lines
1.9 KiB
VimL
Executable file

call plug#begin('~/.vim/plugged')
Plug 'https://github.com/scrooloose/nerdtree.git'
Plug 'https://github.com/powerline/fonts'
Plug 'https://github.com/tpope/vim-fugitive'
Plug 'https://github.com/ervandew/supertab'
"Indent automiatically depending on filetype
filetype plugin on
set autoindent
filetype indent on
"Fix different locale settings when ssh'ing
set encoding=utf-8
"Set syntax on
syntax enable
" Create the `tags` file (may need to install ctags first)
" for autocompletion
command! MakeTags !ctags -R .
"4 spaces instead of tabs
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
" Fold methods based on indents
" zo to open folds, zc to close
set foldmethod=indent
set foldlevel=99
" FINDING FILES
" Search down into subfolders
" Provides tab-completion for all file-related tasks
" " - Hit tab to :find by partial match
" - Use * to make it fuzzy
set path+=**
" Display all matching files when we tab complete
set wildmenu
set backspace=2
" Vim & Tmux background color fix
set t_ut=
" Light colorscheme by default
colorscheme greygull
" Terminal colors
set termguicolors
"Automatically source vimrc on save.
autocmd! bufwritepost $MYVIMRC source $MYVIMRC
"Line numbers
set number
"Changes to current directory when creating new files
set autochdir
"Higlhight search
set hls
"Search as characters are entered
set incsearch
"Line for linewrapping
set colorcolumn=80
"Remove temporary swap file
set nobackup
set noswapfile
"Wrap text instead of being on one line
set lbr
"Paste mode toggle
set pastetoggle=<F2>
:map <F5> :e <CR>
"Default Colors for CursorLine
set cursorline
highlight CursorLine cterm=none
"Activate statusbar
set laststatus=2
set statusline=\ %F\ %m%r%w\ %=\ %{hostname()}\ \ \ %{strlen(&ft)?&ft:'none'}\ %{(&bomb?\",BOM\":\"\")}\ %{&ff}\ \ %l/%L\ \ %c\ %P
"Remove trailing spaces on save
autocmd BufWritePre * :%s/\s\+$//e
" Plugins
" Nerdtree
map <C-e> :NERDTreeToggle<CR>
call plug#end()