Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible
- " Helps force plugins to load correctly when it is turned back on below
- filetype off
- " TODO: Load plugins here (pathogen or vundle)
- " Vundle
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " Plugins managed by vundle
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'scrooloose/nerdtree'
- Plugin 'nvie/vim-flake8'
- Plugin 'flazz/vim-colorschemes'
- Plugin 'pangloss/vim-javascript'
- call vundle#end() " required
- filetype plugin indent on " required
- " Turn on syntax highlighting
- syntax on
- highlight BadWhitespace ctermbg=red guibg=red
- execute pathogen#infect()
- " TODO: Pick a leader key
- let mapleader = " "
- " Security
- set modelines=0
- " Auto-toggle numbering modes
- :set number relativenumber
- :augroup numbertoggle
- : autocmd!
- : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
- : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
- :augroup END
- " Show file stats
- set ruler
- " Blink cursor on error instead of beeping (grr)
- set visualbell
- " Encoding
- set encoding=utf-8
- " Whitespace
- "" set wrap
- " Python, PEP-008
- au BufRead,BufNewFile *.py,*.pyw set expandtab
- au BufRead,BufNewFile *.py,*.pyw set textwidth=139
- au BufRead,BufNewFile *.py,*.pyw,*.html set tabstop=4
- au BufRead,BufNewFile *.py,*.pyw set softtabstop=4
- au BufRead,BufNewFile *.py,*.pyw,*.html set shiftwidth=4
- au BufRead,BufNewFile *.py,*.pyw set autoindent
- au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
- au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /\s\+$/
- au BufNewFile *.py,*.pyw set fileformat=unix
- au BufRead,BufNewFile *.py,*.pyw let b:comment_leader = '#'
- " html, yaml
- au BufRead,BufNewFile *.html,*.yaml set autoindent
- au BufRead,BufNewFile *.html,*.yaml set cindent
- au BufRead,BufNewFile *.html,*.yaml set tabstop=4
- au BufRead,BufNewFile *.html,*.yaml set shiftwidth=2
- " javascript
- let g:jsx_ext_required = 1
- " Cursor motion
- set scrolloff=3
- set backspace=indent,eol,start
- set matchpairs+=<:> " use % to jump between pairs
- runtime! macros/matchit.vim
- " Move up/down editor lines
- nnoremap j gj
- nnoremap k gk
- " Allow hidden buffers
- set hidden
- " Rendering
- set ttyfast
- " Status bar
- set laststatus=2
- " Last line
- set showmode
- set showcmd
- " Searching
- nnoremap / /\v
- vnoremap / /\v
- set hlsearch
- set incsearch
- set ignorecase
- set smartcase
- set showmatch
- map <leader><space> :let @/=''<cr> " clear search
- " Remap help key.
- inoremap <F1> <ESC>:set invfullscreen<CR>a
- nnoremap <F1> :set invfullscreen<CR>
- vnoremap <F1> :set invfullscreen<CR>
- " Easier esc key
- imap ` <Esc>
- " Textmate holdouts
- " Formatting
- map <leader>q gqip
- " Visualize tabs and newlines
- set listchars=tab:▸\ ,eol:¬
- " Uncomment this to enable by default:
- " set list " To enable by default
- " Or use your leader key + l to toggle on/off
- map <leader>l :set list!<CR> " Toggle tabs and EOL
- let g:ycm_server_keep_logfiles = 1
- let g:ycm_server_log_level = 'debug'
- " Color scheme (terminal)
- set t_Co=256
- set background=dark
- colorscheme apprentice
- highlight Normal ctermbg=NONE
- highlight nonText ctermbg=NONE
Add Comment
Please, Sign In to add comment