Permalink
Browse files

vimrc tweaks

  • Loading branch information...
1 parent 32a4479 commit 5bba6c3de1f928208e217e5f5ab84e3cd35cd909 @neror committed Oct 27, 2012
Showing with 16 additions and 2 deletions.
  1. +16 −2 vimrc
View
18 vimrc
@@ -2,14 +2,15 @@ set nocompatible
filetype plugin indent on
runtime bundle/vim-pathogen/autoload/pathogen.vim
+set history=2000
set backupcopy=yes
set showcmd
set ruler
set tabstop=2
set shiftwidth=2
set softtabstop=2
set textwidth=140
-set noexpandtab
+set expandtab
set smartindent
set foldmethod=syntax
set incsearch
@@ -22,6 +23,7 @@ set showmode
set showmatch
set number
set splitright
+set list
"let &showbreak = '... '
"syn sync minlines=1000
set paste
@@ -38,13 +40,18 @@ call pathogen#infect()
"set statusline=%<%f\ %y%m%r%w%=%-14.(%l,%c%V%)\ %P
"map Q to reflow paragraph
-nnoremap Q gqap
+nnoremap Q gqip
+nnoremap W vipJ
"and to relfow a selected block in visual mode
vnoremap Q gq
"Make the spacebar do something useful in normal mode
nnoremap <Space> viw
+"HJKL use virtual lines
+nnoremap j gj
+nnoremap k gk
+
"Clear the search pattern
set nohlsearch
nnoremap <Leader>sh :set hlsearch!<CR>
@@ -57,6 +64,10 @@ nnoremap <Leader>z :TlistToggle<CR>
"NERDTree plugin
nnoremap <Leader>n :NERDTreeToggle<CR>
+"CtrlP custom settings
+let g:ctrlp_clear_cache_on_exit = 1
+let g:ctrlp_working_path_mode = 'a'
+
if has("mac")
augroup filetype_markdown_on_mac
autocmd!
@@ -70,6 +81,9 @@ if has("mac")
"formd Markdown shortcuts
autocmd FileType markdown nmap <buffer> <leader>fr :%! formd -r<CR>
autocmd FileType markdown nmap <buffer> <leader>fi :%! formd -i<CR>
+
+ "Turn off list setting to make text wrap at word boundaries
+ autocmd FileType markdown :set nolist
augroup END
if exists("*togglebg")

0 comments on commit 5bba6c3

Please sign in to comment.