Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

vimrc improvements

  • Loading branch information...
commit 3faeb53fbf49b66a0ca350195d962339c4ca6fd4 1 parent 0fa47eb
@berekuk authored
Showing with 25 additions and 2 deletions.
  1. +2 −0  vim/colors/my.vim
  2. +23 −2 vim/vimrc
View
2  vim/colors/my.vim
@@ -9,3 +9,5 @@ hi PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE
hi Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE
hi Underlined term=underline cterm=underline ctermfg=DarkMagenta
hi Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE
+
+hi ColorColumn ctermbg=lightgrey
View
25 vim/vimrc
@@ -5,6 +5,8 @@ call pathogen#runtime_append_all_bundles()
set nocompatible " nobody cares about stupid classic vi
+set ttyfast
+
" disable modeline - they cause security issues
set modelines=0
set nomodeline
@@ -18,6 +20,8 @@ set tabstop=4
set shiftwidth=4
set softtabstop=4
+set backspace=indent,eol,start " allow backspace everywhere
+
" spaces instead of tabs
set expandtab
@@ -32,8 +36,11 @@ set scrolloff=3 " going to try it for some time and see if I like it
set hlsearch " highlight all search results
set incsearch " incremental search
+set gdefault " s///g by default
+
set ruler " useful info at the bottom of the screen
-set laststatus=2 " even if only one file is open
+set laststatus=2 " even if only one file is open
+set colorcolumn=80 " long lines are evil
set history=50 " increase command history buffer
set showcmd
@@ -47,10 +54,15 @@ inoremap # X#
set visualbell " don't beep!
set wildmenu " improved file select menu
+set wildmode=list:longest " consistent with bash
set background=light
colorscheme my
+" easier to type than default '\'
+let mapleader = ","
+let maplocalleader = ","
+
" disable search highlight
map <F2> :nohlsearch<CR>
@@ -68,8 +80,17 @@ set pastetoggle=<F8>
" delete all trailing spaces
nnoremap <LocalLeader><Space> :%s/\s\+$//<CR>
-autocmd BufNewFile,BufRead COMMIT_EDITMSG set filetype=gitcommit " highlight 'git commit' contents
+" very magic regexes - perl compatible (mostly)
+nnoremap / /\v
+vnoremap / /\v
+
+" highlight 'git commit' contents
+autocmd BufNewFile,BufRead COMMIT_EDITMSG set filetype=gitcommit
filetype plugin on
filetype indent on
syntax on
+
+""""""""""""""""" TODO """""""""""""""
+" set hidden?
+" set cursorline?
Please sign in to comment.
Something went wrong with that request. Please try again.