-
-
Save chrisvest/68254 to your computer and use it in GitHub Desktop.
.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set background=dark | |
" Return cursor to the previous position when this file was open last | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal g'\"" | endif | |
filetype plugin indent on | |
" VimClojure setup | |
let clj_highlight_builtins = 1 | |
let clj_highlight_contrib = 1 | |
let clj_paren_rainbow = 1 | |
let clj_want_gorilla = 1 | |
let vimclojure#NailgunClient = "/Users/cvh/work/vimclojure/ng" | |
" The following are commented out as they cause vim to behave a lot | |
" differently from regular Vi. They are highly recommended though. | |
set showmatch " Show matching brackets. | |
set incsearch " Incremental search | |
set ignorecase | |
set autowrite " Automatically save before commands like :next and :make | |
" Basic options | |
set autoindent | |
set smarttab | |
set ruler | |
set showcmd | |
set expandtab | |
set formatoptions=cl1 | |
set textwidth=79 | |
set nowrap | |
set lbr | |
set foldmethod=indent | |
set nofoldenable " Folding off by default on file open | |
set shellcmdflag=-lc | |
colorscheme evening | |
set modeline | |
set modelines=5 | |
set laststatus=2 | |
set scrolloff=4 | |
set matchtime=2 | |
set nomore | |
set wildmenu | |
set wildchar=<Tab> | |
set wildmode=list:longest | |
set number | |
set guioptions-=T | |
" Markdown | |
autocmd FileType mkd setlocal ai formatoptions=tcroqn2 comments=n:> | |
" defaults | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
" Up, Down, Home and End keys in normal and insert mode | |
map <up> gk | |
imap <up> <C-o>gk | |
map <down> gj | |
imap <down> <C-o>gj | |
" Make left on line-ends go to start of next line, | |
" and right on line-starts go to end of previous line, | |
" in both normal and insert mode. | |
map <expr> <Left> col(".") <= 1 ? "k$" : "\<Left>" | |
imap <expr> <Left> col(".") <= 1 ? "<C-o>k<C-o>$" : "\<Left>" | |
map <expr> <Right> col(".") + 1 >= col("$") ? "j0" : "\<Right>" | |
imap <expr> <Right> col(".") + 1 >= col("$") ? "<C-o>j<C-o>0" : "\<Right>" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment