Instantly share code, notes, and snippets.

@simonista /.vimrc
Last active Nov 19, 2018

Embed
What would you like to do?
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
" For plugins to load correctly
filetype plugin indent on
" TODO: Pick a leader key
" let mapleader = ","
" Security
set modelines=0
" Show line numbers
set number
" Show file stats
set ruler
" Blink cursor on error instead of beeping (grr)
set visualbell
" Encoding
set encoding=utf-8
" Whitespace
set wrap
set textwidth=79
set formatoptions=tcqrn1
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set noshiftround
" Cursor motion
set scrolloff=3
set backspace=indent,eol,start
set matchpairs+=<:> " use % to jump between pairs
runtime! macros/matchit.vim
" Move up/down editor lines
nnoremap j gj
nnoremap k gk
" Allow hidden buffers
set hidden
" Rendering
set ttyfast
" Status bar
set laststatus=2
" Last line
set showmode
set showcmd
" Searching
nnoremap / /\v
vnoremap / /\v
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
map <leader><space> :let @/=''<cr> " clear search
" Remap help key.
inoremap <F1> <ESC>:set invfullscreen<CR>a
nnoremap <F1> :set invfullscreen<CR>
vnoremap <F1> :set invfullscreen<CR>
" Textmate holdouts
" Formatting
map <leader>q gqip
" Visualize tabs and newlines
set listchars=tab:▸\ ,eol
" Uncomment this to enable by default:
" set list " To enable by default
" Or use your leader key + l to toggle on/off
map <leader>l :set list!<CR> " Toggle tabs and EOL
" Color scheme (terminal)
set t_Co=256
set background=dark
let g:solarized_termcolors=256
let g:solarized_termtrans=1
" put https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim
" in ~/.vim/colors/ and uncomment:
" colorscheme solarized
@DevinJamesK

This comment has been minimized.

DevinJamesK commented Oct 15, 2015

This is nice, thanks!

@dracconi

This comment has been minimized.

dracconi commented Sep 24, 2016

thanks too!

@a1ultima

This comment has been minimized.

a1ultima commented Nov 23, 2016

I get many errors, I'm using Vim 7.3, may I ask which version of Vim you are using?

@yahyaguzide

This comment has been minimized.

yahyaguzide commented Mar 7, 2017

nice thank you

@stanleykylee

This comment has been minimized.

stanleykylee commented May 4, 2017

Worked great, thanks!

@njablonski

This comment has been minimized.

njablonski commented May 11, 2017

Excellent starting point, thanks!

@eightarcher

This comment has been minimized.

eightarcher commented May 24, 2017

Wunderbar! Many thanks for this.

@Lijun21

This comment has been minimized.

Lijun21 commented Jun 24, 2017

Thank you!

@vibhuthasak

This comment has been minimized.

vibhuthasak commented Jul 30, 2017

Thanks..

@Earthmor

This comment has been minimized.

Earthmor commented Aug 26, 2017

Actual on all time. Thanks!

@hlwei

This comment has been minimized.

hlwei commented Nov 3, 2017

Thanks! it is very useful~

@genisd

This comment has been minimized.

genisd commented Dec 5, 2017

thanks!

@tandavala

This comment has been minimized.

tandavala commented Feb 26, 2018

thanks!

@ichergui

This comment has been minimized.

ichergui commented Mar 2, 2018

thanks :)

@hyojeonglee

This comment has been minimized.

hyojeonglee commented Mar 12, 2018

thanks!

@Ungerfall

This comment has been minimized.

Ungerfall commented Mar 12, 2018

thanks : )

@MikeWise2718

This comment has been minimized.

MikeWise2718 commented Mar 21, 2018

Just what I needed to get started.

@crazycoderTR

This comment has been minimized.

crazycoderTR commented Mar 27, 2018

thanks :))

@ghost

This comment has been minimized.

ghost commented May 10, 2018

Thanks. Nice job.

@laeshiny

This comment has been minimized.

laeshiny commented Jul 16, 2018

thanks. it is so nice~!! 👍

@darthque

This comment has been minimized.

darthque commented Aug 5, 2018

ThankyouThankyou

@raudraroop

This comment has been minimized.

raudraroop commented Sep 14, 2018

There is this white flash on the screen if the cursor can't go further, what part of the code does it, I don't want that.

@theodorehadges

This comment has been minimized.

theodorehadges commented Oct 5, 2018

There is this white flash on the screen if the cursor can't go further, what part of the code does it, I don't want that.

@raudraroop Line 28: set visualbell does this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment