Created
July 30, 2015 19:45
-
-
Save darribas/895abb8e5dcff2f27714 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
"set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'nelstrom/vim-markdown-folding' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
"Plugin 'tpope/vim-fugitive' | |
" plugin from http://vim-scripts.org/vim/scripts.html | |
"Plugin 'L9' | |
" Git plugin not hosted on GitHub | |
"Plugin 'git://git.wincent.com/command-t.git' | |
" git repos on your local machine (i.e. when working on your own plugin) | |
"Plugin 'file:///home/gmarik/path/to/plugin' | |
" The sparkup vim script is in a subdirectory of this repo called vim. | |
" Pass the path to set the runtimepath properly. | |
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
" Avoid a name conflict with L9 | |
"Plugin 'user/L9', {'name': 'newL9'} | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just | |
:PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to | |
auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <Bram@vim.org> | |
" Last change: 2002 Sep 19 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.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=50 " 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 | |
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries | |
" let &guioptions = substitute(&guioptions, "t", "", "g") | |
" Don't use Ex mode, use Q for formatting | |
map Q gq | |
" This is an alternative that also works in block mode, but the deleted | |
" text is lost and it only works for putting the current register. | |
"vnoremap p "_dp | |
" 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=78 | |
" 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") | |
" REQUIRED. This makes vim invoke latex-suite when you open a tex file. | |
filetype plugin on | |
" IMPORTANT: grep will sometimes skip displaying the file name if you | |
" search in a singe file. This will confuse latex-suite. Set your grep | |
" program to alway generate a file-name. | |
set grepprg=grep\ -nH\ $* | |
" OPTIONAL: This enables automatic indentation as you type. | |
filetype indent on | |
""""""""""""""""""""""""""""" | |
" From old .vimrc | |
set showmode | |
set number | |
set showmatch | |
set textwidth=78 | |
syn on | |
set ruler | |
set vb t_vb= | |
colorscheme slate | |
set lines=108 | |
set columns=100 | |
"set transparency=18 | |
set backspace=2 | |
set autoindent | |
set ignorecase "ingnores case when searching | |
set incsearch "jumps to search word as you type | |
filetype plugin on | |
set expandtab | |
set tabstop=4 | |
set printoptions=number:y,paper:letter | |
" the following are more print options to append to the above line: collate:n,syntax:n,duplex:off | |
au FileType python source ~/.vim/syntax/python.vim | |
"Some stuff for LaTex-Suite | |
set grepprg=grep\ -nH\ $* | |
filetype indent on | |
set shiftwidth=4 | |
imap <F2> \item{}<ESC>li | |
imap <F3> <bar> * | |
imap <F4> $$<ESC>i | |
imap <F5> <ESC>xi$<ESC>pa$ | |
vmap <F5> xi$<ESC>pa$ | |
imap <S-F5> <ESC>3hi$<ESC>la_{<ESC>2la}$ | |
map <F6> {gq} | |
imap <F6> <ESC>{gq} | |
map <F7> z= | |
map <F8> ]s | |
imap <F7> z= | |
imap <F8> ]s | |
map <S-right> vl | |
map <S-left> vh | |
map <S-up> vk | |
map <S-down> vj | |
imap <S-right> <ESC>vl | |
imap <S-left> <ESC>vh | |
imap <S-up> <ESC>vk | |
imap <S-down> <ESC>vj | |
vmap <S-right> l | |
vmap <S-left> h | |
vmap <S-up> k | |
vmap <S-down> j | |
"imap <S-Down> <ESC>vset ft=vim :y | |
filetype plugin indent on | |
syntax on | |
map <M-F2> hi\ref{tab:<ESC>la}<ESC> | |
imap <M-F2> <ESC>hi\ref{tab:<ESC>la} | |
map <M-F3> hi\ref{fig:<ESC>la}<ESC> | |
imap <M-F3> <ESC>hi\ref{fig:<ESC>la} | |
imap <M-F4> <ESC>x2hxi\ref{eq:ga04<ESC>1la} | |
imap <M-F5> <ESC>x3hxi\ref{eq:ga04<ESC>2la} | |
imap <M-F6> <ESC>hi$<ESC>la_<ESC>la$ | |
imap <M-F7> <ESC>2hi$<ESC>la_{<ESC>2la}$ | |
imap <M-F8> \begin{equation}<ESC>o<ESC>o\end{equation}<ESC>ki | |
imap <M-F9> <ESC>i\mathbf{<ESC>la} | |
" tab navigation like firefox --- note doesn't sem to work | |
"map <C-S-tab> :tabprevious<cr> | |
"map <C-tab> :tabnext<cr> | |
"map <C-Tab> :tabn <CR> | |
"map <C-S-Tab> :tabp <CR> | |
map <D-t> :tabnew<cr> | |
map <D-w> <ESC>:tabclose<cr> | |
vmap <M-F4> xi\emph{<ESC>pa} | |
"Some text helpers | |
:ab bcon $\beta$-convergence | |
:ab scon $\sigma$-convergence | |
"Lines | |
"set cuc | |
"set cul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment