Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 131 lines (121 sloc) 4.185 kb
bcf4d44 Initial commit
maloi authored
1 " Notes {
2 "
3 " Sections
4 " -> Basic
5 " -> General
6 " -> UI
7 " -> Tabs/Layout
8 " -> Search
9 " -> Plugin Settings
10 " -> Mappings
11 " -> Autocommands
12 "
13 " }
14
15
16 " Basic {
17 call pathogen#infect()
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
18 set nocompatible " don't use vi-compatible mode
19 set noexrc " don't use .vimrc in current directory
20 set history=1000 " remember most of the commands
21 set background=dark " dark is stark
bcf4d44 Initial commit
maloi authored
22 if has("gui_running")
eaca53e added tcomment_vim plugin and some mappings in vimrc
maloi authored
23 set guioptions-=m " remove menu bar
24 set guioptions-=T " remove toolbar
25 set guioptions-=r " remove scroll-bar
bcf4d44 Initial commit
maloi authored
26 colorscheme railscasts
27 elseif $COLORTERM == 'gnome-terminal'
28 set term=gnome-256color
29 colorscheme railscasts
30 else
31 colorscheme default
32 endif
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
33 syntax on " syntax highlight on
bcf4d44 Initial commit
maloi authored
34 " }
35
36 " General {
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
37 filetype plugin indent on " load filetype plugins/indent settings
38 set nobackup " use version control
39 set fileformats=unix,dos,mac " support all three, in this order
40 set hidden " change buffers w/out saving
41 " set mouse=a " maybe i can need it
42 set mousehide " hide mouse while typing
43 set noerrorbells " no noise
44 set wildmenu " <TAB> completion shell-like
bcf4d44 Initial commit
maloi authored
45 set wildmode=longest:full
46 " }
47
48 " UI {
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
49 set number " show line numbers
50 set numberwidth=4 " up to 9999 lines
51 set laststatus=2 " always show status line
52 set list " show tabs and trailing spaces
53 set listchars=tab:\ ,trail:¬ " nice symbols
54 highlight NonText guifg=#4a4a59 " make it barely visible
55 highlight SpecialKey guifg=#4a4a59 " make it barely visible
56 set matchtime=4 " show 0.4s matching bracket
57 set showmatch " show matching brackets
58 set nostartofline " leave cursor where it was
59 set ruler " show current position
60 set scrolloff=5 " keep 5 lines (top/bottom) when scrolling
61 set shortmess=aOstT " shortens msgs to avoid 'press a key' prompt
62 set showcmd " show command that is being typed
bcf4d44 Initial commit
maloi authored
63 set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
64 " | | | | | | | | | | |
65 " | | | | | | | | | | + current column
66 " | | | | | | | | | |
67 " | | | | | | | | | +-- current line
68 " | | | | | | | | +-- current % into file
69 " | | | | | | | +-- current syntax in square brackets
70 " | | | | | | |
71 " | | | | | | +-- current fileformat
72 " | | | | | +-- number of lines
73 " | | | | +-- preview flag in square brackets
74 " | | | +-- help flag in square brackets
75 " | | +-- readonly flag in square brackets
76 " | +-- rodified flag in square brackets
77 " +-- full path to file in the buffer
78 " }
79
80 " Tabs/Layout {
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
81 set completeopt= " no popup menu for completion
82 set expandtab " no real tabs
83 set shiftround " when 3 spaces and one hits > go to 4, not 5
84 set tabstop=2 " real tabs are 2 spaces
85 set softtabstop=2 " tab and backspace are 2 spaces
86 set shiftwidth=2 " indent 2 spaces
729309e New vimrc
maloi authored
87 " set nowrap " do not wrap lines
bcf4d44 Initial commit
maloi authored
88 " }
89
90 " Search {
eb78e8f Removed tool-, menu- and scrollbar from gvim, reformatted comments
maloi authored
91 set nohlsearch " don't highlight search hits
92 set ignorecase " case insensitive by default
93 set smartcase " if there are caps, go case-sensitive
bcf4d44 Initial commit
maloi authored
94 " }
95
96 " Plugin Settings {
729309e New vimrc
maloi authored
97 " NerdTree
98 map <C-f> :NERDTree<CR>
bcf4d44 Initial commit
maloi authored
99 " }
100
101 " Mappings {
102 " Windows {
103 map <C-k> <C-W>k
104 map <C-j> <C-W>j
105 map <C-h> <C-W>h
106 map <C-l> <C-W>l
107 map <C-Up> <C-W>k
108 map <C-Down> <C-W>j
109 map <C-Left> <C-W>h
110 map <S-right> <C-W>l
111 " }
112 " Tabs {
113 map <S-Left> :tabprev<CR>
114 map <S-Right> :tabnext<CR>
115 " direct to tab # with #gt where # is the number of the tab
116 " }
eaca53e added tcomment_vim plugin and some mappings in vimrc
maloi authored
117 " Toolbars {
118 nnoremap <C-F1> :if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>
119 nnoremap <C-F2> :if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>
120 nnoremap <C-F3> :if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>
121 " }
bcf4d44 Initial commit
maloi authored
122 " }
123
124 " Autocommands {
125 " make vim restore cursor position in files
126 if has("autocmd")
127 au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
729309e New vimrc
maloi authored
128 au FileType python setl sw=4 sts=4
bcf4d44 Initial commit
maloi authored
129 endif
130 " }
Something went wrong with that request. Please try again.