Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## .gvimrc
- set ch=2 " Make command line two lines high
- set imd
- set mousehide " Hide the mouse when typing text
- set go-=T " Hide top toolbar on start
- " Make shift-insert work like in Xterm
- map <S-Insert> <MiddleMouse>
- map! <S-Insert> <MiddleMouse>
- " Only do this for Vim version 5.0 and later.
- if version >= 500
- " I like highlighting strings inside C comments
- let c_comment_strings=1
- " Switch on syntax highlighting if it wasn't on yet.
- if !exists("syntax_on")
- syntax on
- endif
- " Switch on search pattern highlighting.
- set hlsearch
- endif
- if has("gui_macvim")
- set transp=5
- set cursorline
- set guioptions-=T
- set guioptions-=r
- set guioptions-=l
- set guioptions-=L
- set guioptions-=R
- set guifont=Droid\ Sans\ Mono:h12.00
- endif
- ## .vimrc
- " When started as "evim", evim.vim will already have done these settings.
- if v:progname =~? "evim"
- finish
- endif
- " Use Vim settings, rather then Vi settings (much better!).
- " This must be first, because it changes other options as a side effect.
- set nocompatible
- " allow backspacing over everything in insert mode
- set backspace=indent,eol,start
- if has("vms")
- set nobackup " do not keep a backup file, use versions instead
- else
- set backup " keep a backup file
- endif
- set history=500 " keep 50 lines of command line history
- set ruler " show the cursor position all the time
- set showcmd " display incomplete commands
- set incsearch " do incremental searching
- " Don't use Ex mode, use Q for formatting
- map Q gq
- " Switch syntax highlighting on, when the terminal has colors
- " Also switch on highlighting the last used search pattern.
- if &t_Co > 2 || has("gui_running")
- syntax on
- set hlsearch
- endif
- " Only do this part when compiled with support for autocommands.
- if has("autocmd")
- " Enable file type detection.
- " Use the default filetype settings, so that mail gets 'tw' set to 72,
- " 'cindent' is on in C files, etc.
- " Also load indent files, to automatically do language-dependent indenting.
- filetype plugin indent on
- " Put these in an autocmd group, so that we can delete them easily.
- augroup vimrcEx
- au!
- " For all text files set 'textwidth' to 78 characters.
- autocmd FileType text setlocal textwidth=80
- " When editing a file, always jump to the last known cursor position.
- " Don't do it when the position is invalid or when inside an event handler
- " (happens when dropping a file on gvim).
- autocmd BufReadPost *
- \ if line("'\"") > 0 && line("'\"") <= line("$") |
- \ exe "normal g`\"" |
- \ endif
- augroup END
- else
- set autoindent " always set autoindenting on
- endif " has("autocmd")
- " settings for MiniBufExplorer
- let g:miniBufExplMapWindowNavVim = 1
- let g:miniBufExplMapWindowNavArrows = 1
- let g:miniBufExplCTabSwitchBufs = 1
- let g:miniBufExplSelTarget = 1
- set co=80
- set nu
- set gfn=Anonymous\ Pro:h12
- set sta
- " From SA Users
- set listchars=tab:»·,trail:·
- set list
- " Colorization/display
- " syntax highlighting!
- syntax on
- colorscheme lanai
- set background=dark
- set ruler
- set showcmd
- set laststatus=2
- "set statusline=%{GitBranchInfoString()}
- set statusline=%1*%F%m%r%h%w%=%(%c%V\ %l/%L\ %P%)\ %{GitBranchInfoString()}
- " navigation/search
- set showmatch
- set matchtime=2
- set incsearch
- set ignorecase
- set smartcase
- set nohls
- " formatting
- set autoindent
- set preserveindent
- set nosmartindent
- set smarttab
- set expandtab
- set textwidth=80
- set tabstop=4
- set softtabstop=4
- set shiftwidth=4
- set formatoptions=tcroqn2
- set lbr
- " Behavior
- set foldmethod=indent
- set nofoldenable
- set shellcmdflag=-c
- set shell=bash\ -l
- set modeline
- set modelines=5
- set splitright
- set scrolloff=3
- set nomore
- set wildmenu
- set wildmode=list:longest
- set tabpagemax=100
- set switchbuf=usetab
- filetype plugin on
- " Don't back up files to current directory, use a common spot
- silent execute '!mkdir -p ~/.vim_backups'
- set backupdir=~/.vim_backups//
- set directory=~/.vim_backups//
- " Jump to last known location in file
- if has("autocmd")
- au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
- \| exe "normal g'\"" | endif
- endif
- " Filetype based indent rules
- if has("autocmd")
- filetype indent plugin on
- endif
- "
- " netrw (builtin file-browser plugin) preferences
- "
- " Default to tree view
- let g:netrw_lifestyle = 3
- " hide common hidden files
- let g:netrw_list_hide = '.*\.py[co]$,\.git$,\.swp$'
- " Don't use fricken elinks, wtf
- let g:netrw_http_cmd = "wget -q -O" " or 'curl -Ls -o'
- " Git helper: take up to full length SHA1 under cursor and truncate to 7
- function! TruncateToSevenChars()
- " use viwo instead of b so it works even when cursor is on 1st char of word
- return "viwo7ld"
- endf
- function! FormatShaForCommit()
- return TruncateToSevenChars() . "bicommit:\<Esc>w"
- endf
- nnoremap <expr> <F7> FormatShaForCommit()
- set imd
- " Window settings
- set winminheight=0
- set wmw=0
- set winheight=999
- " Folds
- nnoremap <silent> <Space> @=(foldlevel('.')?'za':'l')<CR>
- vnoremap <Space> zf
- " Searching
- nmap n nzzzv
- nmap N Nzzzv
- nmap * *zzzv
- nmap # #zzzv
- nmap g* g*zzzv
- nmap g# g#zzzv
- " Save sessions
- set sessionoptions=blank,buffers,curdir,folds,globals,help,localoptions,options,resize,tabpages,winsize,winpos
- autocmd FileType python set omnifunc=pythoncomplete#Complete
- autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
- autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
- autocmd FileType css set omnifunc=csscomplete#CompleteCSS
- let Tlist_Use_Right_Window=1
- let Tlist_Auto_Open=0
- let Tlist_Enable_Fold_Column=0
- let Tlist_Compact_Format=0
- let Tlist_WinWidth=70
- let Tlist_Exit_OnlyWindow=1
- let Tlist_File_Fold_Auto_Close = 1
Add Comment
Please, Sign In to add comment