Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 'VundleVim/Vundle.vim'
- "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/'}
- "Install L9 and avoid a Naming conflict if you've already installed a
- "different version somewhere else.
- "Plugin 'ascenator/L9', {'name': 'newL9'}
- "All of your Plugins must be added before the following line"
- Plugin 'fatih/vim-go'
- Bundle "myusuf3/numbers.vim"
- 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
- set ruler
- set clipboard+=unnamed
- set showmatch
- highlight Normal ctermbg=Blue
- highlight Comment ctermbg=DarkGray
- highlight Constant ctermbg=Blue
- highlight Normal ctermbg=Black
- highlight NonText ctermbg=Black
- highlight Special ctermbg=DarkMagenta
- highlight Cursor ctermbg=Green
- " this next line is needed to enable your custom colors:
- syntax enable
- " Update file when changed from the outside
- set autoread
- " Highlight current line
- set cursorline
- " Hide buffers instead of closing
- set hidden
- " Line settings
- set nowrap
- set number
- set numberwidth=3
- " Indentation settings
- " I want spaces
- set expandtab
- " with a smart tab
- set smarttab
- " and 1 tab == 4 spaces
- set shiftwidth=4
- set softtabstop=4
- set shiftround
- set copyindent
- " Linebreak when obsessive
- set lbr
- set tw=500
- " Auto indent
- set ai
- " Smart indent
- set si
- " Wrapping
- set nowrap
- " Status bar
- set laststatus=2
- " Folding
- " Searching
- set ignorecase
- set hlsearch
- set incsearch
- set smartcase
- " Show matching brackets
- set showmatch
- set mat=2
- " Dont redraw while executing macros
- set lazyredraw
- " Set 80-char column (off by default)
- " set colorcolumn=80
- highlight ColorColumn ctermbg=233
- " Encoding
- set encoding=utf-8
- set fileencoding=utf-8
- set fileencodings=utf-8
- " netrw configs
- let g:netrw_banner = 0
- " Backspace tweaks
- set backspace=indent,eol,start
- set whichwrap+=<,>,h,l
- " Fat finger fixes
- cnoreabbrev W! w!
- cnoreabbrev Q! q!
- cnoreabbrev Qall! qall!
- cnoreabbrev Wq wq
- cnoreabbrev Wa wa
- cnoreabbrev wQ wq
- cnoreabbrev WQ wq
- cnoreabbrev W w
- cnoreabbrev Q q
- cnoreabbrev Qall qall
- " Custom commands
- command Todo vimgrep /TODO\C/ **/*.* | copen
- command Note vimgrep /NOTE\C/ **/*.* | copen
- command Fix vimgrep /FIXME\C/ **/*.* | copen
- command CDC cd %:p:h
- " Retain visual mode after > and <
- vmap < <gv
- vmap > >gv
- " Move visual block
- vnoremap J :m '>+1<cr>gv=gv
- vnoremap K :m '<-2<cr>gv=gv
- " For encoding/formats
- set encoding=utf-8 nobomb
- set fileformats=unix,dos,mac
- " For editing binaries
- set binary
- " Send more characters at a given time
- set ttyfast
- " Show partial command on last line
- set showcmd
- " How to split new windows
- set splitbelow splitright
- " ======= Colors and Fonts ======== "
- " Syntax highlighting
- syntax on
- " Enable dark background
- set background=dark
- " Enable 256 colormode
- set t_Co=256
- " Mouse tweak
- set mousemodel=popup
- " ====== COMMANDS/MAPPINGS ======= "
- let mapleader="," " Set the mapleader to be ,
- "
- nnoremap ; :
- map q: <Nop>
- cmap w!! w !sudo tee > /dev/null %
- " ===== GO ===== "
- " Clear filetype flags before changing runtimepath to force Vim to reload them.
- filetype off
- filetype plugin indent off
- set runtimepath+=$GOROOT/misc/vim
- filetype plugin indent on
- syntax on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement