Skip to content

Instantly share code, notes, and snippets.

@dorfsmay
Created December 20, 2017 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dorfsmay/2f24b4a479924d868d3556c27ee0f455 to your computer and use it in GitHub Desktop.
Save dorfsmay/2f24b4a479924d868d3556c27ee0f455 to your computer and use it in GitHub Desktop.
""""""""""""""""""""""""""""""""""""""
" For vundle
" to install all plugins:
" vim +PluginInstall +qall
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""
" plugins
Plugin 'tpope/vim-fugitive'
Plugin 'jamessan/vim-gnupg'
Plugin 'vim-syntastic/syntastic'
Plugin 'rust-lang/rust.vim'
" Look into racer at some point
"Plugin 'racer-rust/vim-racer'
""""""""""""""""""""""""""""""""""""""
call vundle#end()
filetype plugin on
" run rustfmt on save
let g:rustfmt_autosave = 1
" line numbers
set nu
" status line
set statusline=
set statusline +=%5*%{&ff}%* "file format
set statusline +=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
set statusline +=%3*%y%* "file type
set statusline +=%4*\ %<%F%* "full path
set statusline +=%2*%m%* "modified flag
set statusline +=%1*%=%5l%* "current line
set statusline +=%2*/%L%* "total lines
set statusline +=%1*%4v\ %* "virtual column number
set statusline +=%2*0x%04B\ %* "character under cursor
set ls=2 " alwways show status line
" ignorecase when searching
set ignorecase smartcase
" highlight searches
set hlsearch
" show matching brackets
set showmatch
" syntax highlighting
syntax enable
" no backup, thank you.
set nobackup
" tabs, 4 spaces
set smarttab
set shiftwidth=4
set tabstop=4
set expandtab
" indent same as previous line
set autoindent
" indent based on syntax
set smartindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment