Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

toggle printable chars

  • Loading branch information...
commit 3ee00575820f30067f1f2d286b0d1e322799c2dd 1 parent 343a6b5
Adrian Olaru authored

Showing 1 changed file with 46 additions and 40 deletions. Show diff stats Hide diff stats

  1. +46 40 vimrc
86 vimrc
... ... @@ -1,5 +1,5 @@
1 1 set nocompatible
2   -filetype off
  2 +filetype off
3 3 set rtp+=~/.vim/bundle/vundle/
4 4 call vundle#rc()
5 5
@@ -29,7 +29,7 @@ Bundle 'lunaru/vim-less'
29 29 Bundle 'tomasr/molokai'
30 30 Bundle 'altercation/vim-colors-solarized'
31 31
32   -filetype plugin indent on
  32 +filetype plugin indent on
33 33
34 34 set termencoding=utf-8
35 35 set encoding=utf-8
@@ -41,14 +41,14 @@ set hidden
41 41 set t_Co=256
42 42
43 43 " change the terminal's title
44   -set title
  44 +set title
45 45
46 46 " support all three, in this order
47   -set fileformats=unix,dos,mac
  47 +set fileformats=unix,dos,mac
48 48 " none of these are word dividers
49   -set iskeyword+=_,$,@,%,#
  49 +set iskeyword+=_,$,@,%,#
50 50 " ignore these list file extensions
51   -set linespace=2
  51 +set linespace=2
52 52 " turn on line numbers
53 53 " set number
54 54 " we are good up to 99999 lines
@@ -56,65 +56,66 @@ set linespace=2
56 56 " shortens messages to avoid 'press a key' prompt
57 57 set shortmess=aOstT
58 58 " make folding work
59   -set fdm=marker
  59 +set fdm=marker
60 60 " keep 10 lines (top/bottom) for scope
61   -set scrolloff=10
  61 +set scrolloff=10
62 62 " turn on wild mode huge list
63   -set wildmode=list:longest
  63 +set wildmode=list:longest
64 64 " turn on command line completion wild style
65   -set wildmenu
  65 +set wildmenu
66 66 " automatically insert comment leader on return, and let gq format comments
67   -set formatoptions=rq
  67 +set formatoptions=rq
68 68 " don't use a pop up menu for completions
69   -set completeopt=
  69 +set completeopt=
70 70 " display unprintable chars
71   -" set list
72   -" set listchars=tab:▸\ ,eol:¬
  71 +set listchars=tab:▸\ ,eol:¬
73 72 " allow backspacing over everything in insert mode
74 73 set backspace=indent,eol,start
75 74 " don't wrap lines
76   -set nowrap
77   -" a tab is four spaces
78   -set tabstop=2
  75 +set nowrap
  76 +" a tab is 2 spaces
  77 +set tabstop=2
  78 +set softtabstop=2
  79 +" expand tabs by default
  80 +set expandtab
79 81 " always set autoindenting on
80   -set autoindent
  82 +set autoindent
81 83 " copy the previous indentation on autoindenting
82   -set copyindent
83   -
  84 +set copyindent
84 85 " number of spaces to use for autoindenting
85   -set shiftwidth=2
  86 +set shiftwidth=2
86 87 " use multiple of shiftwidth when indenting with '<' and '>'
87 88 " when at 3 spaces, and I hit > ... go to 4, not 5
88   -set shiftround
  89 +set shiftround
89 90 " set show matching parenthesis
90   -set showmatch
  91 +set showmatch
91 92 " ignore case when searching
92   -set ignorecase
  93 +set ignorecase
93 94 " case inferred by default
94   -set infercase
  95 +set infercase
95 96 " ignore case if search pattern is all lowercase, case-sensitive otherwise
96   -set smartcase
  97 +set smartcase
97 98 " insert tabs on the start of a line according to shiftwidth, not tabstop
98   -set smarttab
  99 +set smarttab
99 100
100 101 " highlight search terms
101   -set hlsearch
  102 +set hlsearch
102 103 " show search matches as you type
103   -set incsearch
  104 +set incsearch
104 105
105 106 " remember more commands and search history
106   -set history=1000
  107 +set history=1000
107 108 " use many muchos levels of undo
108   -set undolevels=1000
  109 +set undolevels=1000
109 110
110 111 " ignore files we don't need to edit
111 112 set wildignore+=*.swp,*.bak,*.pyc,*.class
112 113 set wildignore+=*/.git/*,*/.hq/*,*/.svn/*
113 114 set wildignore+=*.dll,*.o,*.obj,*.exe
114   -set wildignore+=*.jpg,*.gif,*.png
  115 +set wildignore+=*.jpg,*.gif,*.png
115 116
116 117 " no noise please
117   -set noerrorbells
  118 +set noerrorbells
118 119 set novisualbell
119 120
120 121 " don't let vim track backups
@@ -131,16 +132,16 @@ syntax enable
131 132 let mapleader=","
132 133
133 134 " always show the status bar
134   -set laststatus=2
  135 +set laststatus=2
135 136
136 137 " set colorscheme to molokai
137 138 " use dark backgrounds
138 139 let g:solarized_termcolors=256
139 140 set background=dark
140   -colorscheme molokai
  141 +colorscheme solarized
141 142
142 143 " make sure all mardown files have the correct filetype set and setup wrapping
143   -au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} setf markdown
  144 +au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} setf markdown
144 145 " treat JSON files like JavaScript
145 146 au BufNewFile,BufRead *.json set ft=javascript
146 147 " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
@@ -165,15 +166,20 @@ let NERDTreeShowFiles=1 " Show hidden files, too
165 166 let NERDTreeShowHidden=1 " Quit on opening files from the tree
166 167 let NERDTreeQuitOnOpen=1 " Highlight the selected entry in the tree
167 168 let NERDTreeHighlightCursorline=1 " Don't display these kinds of files
168   -let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.py\$class$', '\.obj$',
169   - \ '\.o$', '\.so$', '\.egg$', '^\.git$' ]
  169 +let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.py\$class$', '\.obj$',
  170 + \ '\.o$', '\.so$', '\.egg$', '^\.git$' ]
170 171
171 172 let g:ctrlp_custom_ignore = {
172   - \ 'dir': 'target$\|log$\|logs$\|\.buildcache$'
173   - \}
  173 + \ 'dir': 'target$\|log$\|logs$\|\.buildcache$'
  174 + \}
174 175
175 176
176 177 " Run Ack fast
177 178 nnoremap <leader>a :Ack<Space>
  179 +" remove trailing whitespace
  180 +nnoremap <leader>W :%s/\s\+$//<CR>:let @/=''<CR>
  181 +
178 182 " no search highlight
179 183 nmap <silent> <C-n> :noh<CR>
  184 +" switch between printable chars
  185 +nmap <silent> <C-l> :set invlist<CR>

0 comments on commit 3ee0057

Please sign in to comment.
Something went wrong with that request. Please try again.