Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible
- source $VIMRUNTIME/vimrc_example.vim
- source $VIMRUNTIME/mswin.vim
- behave mswin
- set diffexpr=MyDiff()
- function MyDiff()
- let opt = '-a --binary '
- if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
- if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
- let arg1 = v:fname_in
- if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
- let arg2 = v:fname_new
- if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
- let arg3 = v:fname_out
- if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
- let eq = ''
- if $VIMRUNTIME =~ ' '
- if &sh =~ '\<cmd'
- let cmd = '""' . $VIMRUNTIME . '\diff"'
- let eq = '"'
- else
- let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
- endif
- else
- let cmd = $VIMRUNTIME . '\diff'
- endif
- silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
- endfunction
- "------------------------------- Minhas configuracoes -----------------------
- " SnipMate fix
- " Add this line:
- " source $VIMRUNTIME/after/plugin/snipMate.vim
- " at the end of file C:\Program Files\Vim\vim73\plugin\snipMate.vim
- " source $VIMRUNTIME/after/plugin/snipMate.vim
- colorscheme Dusk
- set guifont=Consolas:h11
- filetype plugin indent on
- :verbose set ai!
- :verbose set si!
- " set si! silent
- " change the mapleader from \ to ,
- let mapleader=","
- "Map escape key to jj -- much faster
- imap jj <esc>
- "Saves time; maps the spacebar to colon
- nmap <space> :
- " Quickly edit/reload the vimrc file
- nmap <silent> <leader>ev :e $MYVIMRC<CR>
- nmap <silent> <leader>sv :so $MYVIMRC<CR>
- set hidden
- set nowrap " don't wrap lines
- set tabstop=4 " a tab is four spaces
- set backspace=indent,eol,start
- " allow backspacing over everything in insert mode
- set autoindent " always set autoindenting on
- set smartindent "talvez deva desabilitar
- set copyindent " copy the previous indentation on autoindenting
- set number " always show line numbers
- set shiftwidth=4 " number of spaces to use for autoindenting
- set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
- set showmatch " set show matching parenthesis
- set ignorecase " ignore case when searching
- set smartcase " ignore case if search pattern is all lowercase,
- " case-sensitive otherwise
- set smarttab " insert tabs on the start of a line according to
- " shiftwidth, not tabstop
- set hlsearch " highlight search terms
- set incsearch " show search matches as you type
- set history=1000 " remember more commands and search history
- set undolevels=1000 " use many muchos levels of undo
- set wildignore=*.swp,*.bak,*.pyc,*.class
- set title " change the terminal's title
- set visualbell " don't beep
- set noerrorbells " don't beep
- set nobackup
- set noswapfile
- set nowritebackup
- if &t_Co >= 256 || has("gui_running")
- " colorscheme ir_black
- colorscheme Dusk
- endif
- if &t_Co > 2 || has("gui_running")
- " switch syntax highlighting on, when the terminal has colors
- syntax on
- endif
- set pastetoggle=<F11>
- set mouse=a
- "It clears the search buffer when you press ,/
- nmap <silent> ,/ :nohlsearch<CR>
- map <F3> :MRU<CR>
- "Show lines numbers
- set number
- set ruler
- "Prefer a slightly higher line height
- set linespace=3
- "Better line wrapping
- set wrap
- "Hide mouse when typing
- set mousehide
- " Alphabetically sort CSS properties in file with :SortCSS
- :command! SortCSS :g#\({\n\)\@<=#.,/}/sort
- set encoding=utf-8
- scriptencoding utf-8
- set fileencoding=utf-8
- set shortmess+=filmnrxoOtT " abbrev. of messages (avoids 'hit enter')
- set viewoptions=folds,options,cursor,unix,slash " better unix / windows compatibility
- "Split windows below the current window.
- set splitbelow
- " session settings
- set sessionoptions=resize,winpos,winsize,buffers,tabpages,folds,curdir,help
- "Map code completion to , + tab
- imap <leader><tab> <C-x><C-o>
- " More useful command-line completion
- set wildmenu
- "Auto-completion menu
- set wildmode=list:longest
- "Change zen coding plugin expansion key to shift + e
- let g:user_zen_expandabbr_key = '<C-e>'
- "Faster shortcut for commenting. Requires T-Comment plugin
- map <leader>c <c-_><c-_>
- set foldenable " auto fold code
- set softtabstop=4 " let backspace delete indent
- " SnipMate {
- " Setting the author var
- " If forking, please overwrite in your .vimrc.local file
- " Shortcut for reloading snippets, useful when developing
- nnoremap ,smr <esc>:exec ReloadAllSnippets()<cr>
- " }
- " easier window navigation
- nmap <C-h> <C-w>h
- nmap <C-j> <C-w>j
- nmap <C-k> <C-w>k
- nmap <C-l> <C-w>l
- "------------------------"
- "NERDTREE PLUGIN SETTINGS
- "------------------------"
- "Shortcut for NERDTreeToggle
- "nmap <leader>nt :NERDTreeToggle <CR>
- map <F2> :NERDTreeToggle<CR>
- "Show hidden files in NerdTree
- let NERDTreeShowHidden=1
- " -------------------- Opções NERDTREE Editadas por mim -------------
- " tab navigation like firefox
- :nmap <C-S-tab> :tabprevious<CR>
- :nmap <C-tab> :tabnext<CR>
- :map <C-S-tab> :tabprevious<CR>
- :map <C-tab> :tabnext<CR>
- :imap <C-S-tab> <Esc>:tabprevious<CR>i
- :imap <C-tab> <Esc>:tabnext<CR>i
- :nmap <C-t> :tabnew :NERDTree<CR>
- :imap <C-t> <Esc>:tabnew :NERDTree<CR>
- "autopen NERDTree and focus cursor in new document
- autocmd VimEnter * NERDTree H:/
- autocmd VimEnter * wincmd p
- "Helpeful abbreviations
- iab lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- iab llorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
- "Spelling corrects. Just for example. Add yours below.
- iab teh the
- iab Teh The
- " Get to home dir easier
- " <leader>hm is easier to type than :cd ~
- nmap <leader>hm :cd ~/ <CR>
- "MRU configuration
- set viewoptions-=options
- augroup vimrc
- autocmd BufWritePost *
- \ if expand('%') != '' && &buftype !~ 'nofile'
- \| mkview
- \| endif
- autocmd BufRead *
- \ if expand('%') != '' && &buftype !~ 'nofile'
- \| silent loadview
- \| endif
- augroup END
Advertisement
Add Comment
Please, Sign In to add comment