I do use vim with Tagbars and The-NERD-tree plugin. I also like to have autochdir enabled. But sometimes, when I switch between files with NERD-tree plugin - Tagbar does not refresh its content and I stick with tags from previous file. If I do "TagbarToggle" again - second Tagbar window appears with current file tags. If I disable autochdir - it seems to work ok. How can I fix this problem? Current .vimrc is attached. Thanks.
syntax on " syntax hl by default
set background=dark " dark background
set shortmess+=I " no startup uganda msg
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set mouse=a " Enable mouse usage (all modes)
set number " line numbers
set guioptions-=T " no toolbar
set vb t_vb= " no beeps
set ruler " status bar and ruller for each windows
set showmatch " show matching brace
set autoindent " the current line's indent level to set the indent level of new lines)
set smartindent " attempt to intelligently guess the indent level
set smartcase " Do smart case matching
set ignorecase " Do case insensitive matching
set virtualedit=all " This setting allows the cursor to freely roam anywhere it likes in command mode.
"set autochdir " Automaticly changes dir to active
"set autowriteall " Autosave files
"-color scheme-------------------------------------------
"colorscheme ir_black
"-tabs configs-------------------------------------------
set expandtab
set tabstop=4
set showtabline=4
set shiftwidth=4
"-ctags configs------------------------------------------
"search for tag files until root
set tags=tags;/
"-autosave configs---------------------------------------
set autowrite
"-search configs-----------------------------------------
set hlsearch
" seek for selected test
nnoremap * *N
"turn off higliting
nnoremap 8 :nohlsearch<CR>
"nnoremap <S-F8> :nohlsearch<CR>
" search in selected text
vnoremap * y :execute ":let #/=#\""<CR> :execute "set hlsearch"<CR>
"-spellcheck configs-------------------------------------
set spelllang=en_us
nn <F7> :setlocal spell!<CR>
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
"setlocal spell spelllang=en_us
"nn <F7> :setlocal spell! spelllang=en_us<CR>
"imap <F7> <C-o>:setlocal spell! spelllang=en_us<CR>
"it should get the dictionary files
"-move between windows-----------------------------------
nmap <silent> <C-k> :wincmd k<CR>
nmap <silent> <C-j> :wincmd j<CR>
nmap <silent> <C-h> :wincmd h<CR>
nmap <silent> <C-l> :wincmd l<CR>
"move between windows
nnoremap <Tab> <C-W>w
"move between windows backwards
nnoremap <S-Tab> <C-W>W
"-encoding-----------------------------------------------
"set encoding=utf-8
"-show invisible chars-----------------------------------
set listchars=tab:>-,eol:$
nnoremap <F8> :set list!<CR>
":highlight NonText ctermfg=red
"set listchars=tab:▸\ ,eol:¬
"set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
"-Tag bar config-----------------------------------------
nnoremap <F4> :TagbarToggle<CR>
"-buffers------------------------------------------------
"nnoremap <F7> :TMiniBufExplorer<CR>
nnoremap <F5> :ls<CR>
nnoremap <C-n> :bnext<CR>
nnoremap <C-b> :bprev<CR>
nnoremap <C-c> :enew<CR>
nnoremap <C-x> :bp<bar>sp<bar>bn<bar>bd<CR>
"-grep---------------------------------------------------
nnoremap <silent> <F9> :Grep<CR>
"-nerd tree----------------------------------------------
nnoremap <F3> :NERDTreeToggle<CR>
"-clipboard----------------------------------------------
set clipboard=unnamedplus
"-easymotion---------------------------------------------
map <F6> <Leader><Leader>W
"-cscope---------------------------------------------
"-VIM plugins--------------------------------------------
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
filetype plugin indent on
" L9 - vim programming library
Bundle 'L9'
Bundle 'The-NERD-tree'
Bundle 'EasyMotion'
Bundle 'grep.vim'
Bundle 'Tagbar'
Bundle 'chazy/cscope_maps'
"Bundle 'buftabs'
"Bundle 'autoload_cscope.vim'
"Bundle 'chazy/cscope_maps'
"Bundle 'FuzzyFinder'
"Bundle 'tpope/vim-fugitive'
Try updating to Vim 7.4. I had the same problem, as described on this tagbar issue.
Related
I use omnicomplete in VIM and my vimrc is like below.
snipping...
" Autocompletion
set completeopt=longest,noselect,menuone
set omnifunc=syntaxcomplete#Complete
autocmd FileType py set omnifunc=python3complete#Complete
But, when I restart vim. omnifunc doesn't work as i set, even value is different from my vimrc settings
I thought my restoring option was problem. However, block below settings.
" Save and load former states
"autocmd BufWinLeave ?* mkview
"autocmd BufWinEnter ?* silent loadview
It still doesn't work...
How can I resolve it?
Appreciate all your help.
EDIT on 2017.11.08 > Here is my full .vimrc file
syntax on
set nocp " no compatibility with VI
set nu " line number
set cursorline " highlight current cursorline
set ruler " display cursor position information at status line
set ic " case insensitive search
set smartcase " don't use ic when there is Capital letter
set hlsearch " hilight search
set incsearch " show search matches as type
set mouse=a " enalbe cursor move with mouse
set ts=4 " size of \t character (tab stop)
set sw=4 " tab size, when use <<, >>
set sts=4 " how many spaces, when type tab (soft tab stop)
set ls=2 " last window's status line option
set expandtab smarttab
set autowrite " Automatically :write before running commands
set autoread " Auto read when a file is changed on disk
set autoindent
set smartindent
set cindent
set vb noeb " visual bell instead of beep
set tm=500 ttm=0 " to leave insert mode without delay
set encoding=utf8
" Autocompletion
set completeopt=longest,noselect,menuone
set omnifunc=syntaxcomplete#Complete
autocmd FileType py set omnifunc=python3complete#Complete
" Cursor shape
let &t_SI = "\e[5 q" " Start Insert mode
let &t_EI = "\e[0 q" " End Insert mode
" Key mapping
nnoremap <F2> :!ctags -R -I --languages=C,C++ --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
nnoremap <F3> :NERDTreeToggle<CR>
nnoremap <F4> :TlistToggle<CR>
nnoremap <F5> <C-w>=
nnoremap Y y$
nnoremap n nzz
nnoremap N Nzz
nnoremap * *zz
nnoremap # #zz
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
inoremap <C-b> <C-Left>
inoremap <C-f> <C-Right>
inoremap <C-a> <Esc>I
inoremap <C-e> <End>
inoremap <C-#> <C-x><C-o>
autocmd FileType c,h,cpp,hpp inoremap {<ENTER> {}<Left><ENTER><ENTER><UP><TAB>
" Save and load former states
autocmd BufWinLeave ?* mkview
autocmd BufWinEnter ?* silent loadview
" C/C++ header
function! s:header()
let name = "__".toupper(substitute(expand("%:t"), "\\.", "_", "g"))."__"
exe "norm! i#ifndef ". name "\n#define ". name "\n\n\n\n#endif\t//". name "\ekk"
endfunction
autocmd BufNewFile *.{h,hpp} call <SID>header()
" Python header
function! s:py_init()
exe "norm! i\n\n\ndef main():\npass\n\n\eIif __name__ == \"__main__\":\n\tmain()\n\egg"
endfunction
autocmd BufNewFile *.py call <SID>py_init()
" Plugin settings using Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'taglist-plus'
Plugin 'nanotech/jellybeans.vim'
call vundle#end()
filetype plugin indent on
" airline settings
set laststatus=2
let g:airline#extensions#tabline#enabled=1 " turn on buffer list
let g:airline_theme='murmur'
let g:airline_powerline_fonts=1
let g:airline#extensions#branch#enabled=1
" NERDTree settings
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
let g:NERDTreeDirArrowExpandable='+'
let g:NERDTreeDirArrowCollapsible='~'
" taglist settings
let Tlist_Use_Right_Window=1
" Color settings with bundle theme (type help highlight in order to see color list)
if has("gui_running")
colo industry " industry, torte, koehler
else
colo slate " slate, koehler, ron, elflord, pablo
endif
colo jellybeans
highlight linenr ctermfg=brown ctermbg=NONE
highlight cursorlinenr ctermfg=green ctermbg=NONE
highlight cursorline cterm=underline
You can find out where an option was last set via
:verbose set omnifunc?
It looks like your problem is caused by a wrong filetype in your :autocmd. Though Python files usually have a *.py extension, the filetype in Vim is named python. So, this should work:
autocmd FileType python set omnifunc=python3complete#Complete
Additional critique
I would recommend putting the settings and mappings into ~/.vim/after/ftplugin/python.vim instead of defining lots of :autocmd FileType python; it's cleaner and scales better; requires that you have :filetype plugin on, though.
By using :set, the value of 'omnifunc' will be inherited by other buffers that are opened from a Python one (e.g. via :new). Usually, this is not what you want. Use :setlocal omnifunc=... instead.
I just moved to Vim about 3 weeks ago. I know this is minor problem but i find it somehow annoy me. Whenever i open vim, statusline (or statusbar?) won't immediately appear (+ cursor always positioned at the last line of the screen) unless i press a key (any key). This is my vimrc for reference:
set nocompatible
" Pathogen
filetype off
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
filetype plugin indent on
" Color Schemes
set t_Co=256
syntax on
set background=dark
colorscheme ir_black
" Misc
set history=200
set backspace=indent,eol,start
set mouse=n
set lazyredraw
runtime macros/matchit.vim
" Escape Timeout
set notimeout
set ttimeout
set ttimeoutlen=10
" Backup & Undo
set noswapfile
set backup
set undofile
set backupdir=~/.vim/backup//
set directory=~/.vim/swap//
set undodir=~/.vim/undo//
" Scroll
set scrolloff=3
" Status Bar
set showmode
set showcmd
set ruler
set laststatus=2
set statusline=
" Tabs & Spaces
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set shiftround
set smarttab
" Text
set encoding=utf-8
set nowrap
set autoindent
set textwidth=80
set formatoptions=qrn1j
" Splitting
set splitbelow
set splitright
" Buffer
set hidden
" Wildmenu
set wildmenu
set wildmode=list:longest,full
set wildignore+=**/vendor/**
set wildignore+=**/node_modules/**
" Auto-completion
set complete=.,i,w,b,u,t
set omnifunc=
set completeopt=longest,menuone,preview
" Searching + Regex
set ignorecase
set smartcase
set hlsearch
set incsearch
set gdefault
highlight Search cterm=underline
nnoremap / /\v
vnoremap / /\v
nnoremap <space> :noh<cr>
" Mapping
let mapleader=","
noremap \ ,
inoremap jk <esc>
noremap L g_
noremap H ^
" Window Resize
nnoremap <silent> <up> <c-w>+
nnoremap <silent> <down> <c-w>-
nnoremap <silent> <left> <c-w><
nnoremap <silent> <right> <c-w>>
" Disable Arrow Keys
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
" Move by Display Line
noremap j gj
noremap k gk
" Toggles
nnoremap <leader>wl :set wrap!<cr>
nnoremap <leader>n :setlocal number!<cr>
nnoremap <leader>l :set list!<cr>
" Wipe Whitespace
nnoremap <leader>ww mz:%s/\s\+$//<cr>:let #/=''<cr>`z
" Easy Access to Active File Directory
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
" Toggles
nnoremap <silent> <leader>n :set number!<cr>
nnoremap <silent> <leader>wl :set wrap!<cr>
" Buffer Navigation
nnoremap <silent> [b :bprevious<cr>
nnoremap <silent> ]b :bnext<cr>
nnoremap <silent> [B :bfirst<cr>
nnoremap <silent> ]B :blat<cr>
" Split Navigation
nnoremap <c-h> <c-w><c-h>
nnoremap <c-j> <c-w><c-j>
nnoremap <c-k> <c-w><c-k>
nnoremap <c-l> <c-w><c-l>
" Netrw
let g:netrw_banner=0
" Grep Ag
if executable("ag")
set grepprg=ag\ --nogroup\ --nocolor\ --ignore-case\ --column
set grepformat=%f:%l:%c:%m,%f:%l:%m
endif
is there something wrong with it?
edit: this is screenshot of what happen with my vim.
before i press a key
Removing lazyredraw from my vimrc fixed this for me as well.
This was with Vim 7.4 on Ubuntu 16.04.
I recently decided to migrate to Gvim, and noticed that some of my gui-specific settings are borked.
I have defined an autocommand to re-source $MYVIMRC upon writing to it, and upon re-sourcing it (this does not happen on the initial startup), an empty bar appears on the bottom. I believe it is the bar that is meant to contain the horizontal scrollbar.
When I attempt to remove the scrollbar using
:set guioptions-=b
nothing happens. However, if I add it first and then remove it,
:set guioptions+=b
:set guioptions-=b
it disappears.
I thought this might be related to how and when I am defining my guioptions. This is the relevant part of my .vimrc:
set guioptions-=m " GUI: Disable Menu
set guioptions-=r " GUI: Disable right scrollbar
set guioptions-=T " GUI: Disable Toolbar
I attempted to put this in an augroup like this
augroup GuiWidgets
au!
set guioptions-=m " GUI: Disable Menu
set guioptions-=r " GUI: Disable right scrollbar
set guioptions-=T " GUI: Disable Toolbar
augroup end
but it made no difference.
What can be the source of this problem?
EDIT 1 - Added .vimrc
let mapleader = ','
inoremap jj <Esc>
set nocompatible
"********************************
" PLUGINS
"********************************
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'benmills/vimux'
NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'kana/vim-textobj-entire'
NeoBundle 'kana/vim-textobj-user'
NeoBundle 'Raimondi/delimitMate'
NeoBundle 'Lokaltog/vim-easymotion'
NeoBundle 'godlygeek/tabular'
NeoBundle 'surround.vim'
NeoBundle 'christoomey/vim-tmux-navigator'
NeoBundle 'Shougo/vimproc.vim'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/vimshell.vim'
NeoBundle 'c.vim'
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
"******************************
" PLUGIN SETTINGS
"******************************
nnoremap <C-p> :Unite file_rec/async:! -silent -start-insert -auto-resize<CR>
"******************************
" PLUGIN MAPPINGS
"******************************
map <Space> <Plug>(easymotion-prefix)
cnoreabbrev bi Unite neobundle/install
cnoreabbrev bu Unite neobundle/update
cnoreabbrev bc NeoBundleClean
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
nmap <Leader>a# :Tabularize /#<CR>
vmap <Leader>a# :Tabularize /#<CR>
"******************************
" GENERAL SETTINGS
"******************************
set t_Co=256
let g:molokai_original=0
colorscheme molokai
filetype plugin indent on
syntax on
set complete-=t
set gfn=Source\ Code\ Pro\ 10
set encoding=utf-8
set number
set lazyredraw
set completeopt-=preview
set ttyfast
set backspace=indent,eol,start
set hidden
set showmatch
set wildmode=longest:list,full
set wildmenu
set shortmess+=I
set showcmd
set showmode
set clipboard=unnamed
set history=50
set nrformats=
set autoread
set ruler
set laststatus=2
set scrolloff=8
set visualbell
set splitright
set smarttab
set autoindent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set ignorecase smartcase
set gdefault
set incsearch
set hlsearch
set nobackup
set noswapfile
set ttimeoutlen=50
set relativenumber
set cursorline
set cc=80
set guioptions-=m
set guioptions-=r
set guioptions-=T
"set guioptions=
match ErrorMsg '\%>80v.\+'
"***************************
" GENERAL MAPPINGS
"***************************
map cn <Esc>:cn<CR>
map cp <Esc>:cp<CR>
nmap <CR> o<Esc>k
inoremap {<CR> {<CR>}<C-o>O
nnoremap <leader>v :e $MYVIMRC<CR>
nnoremap <leader>h :let #/ = ""<CR>
nnoremap n nzz
nnoremap <silent> <leader>; :call setline('.', getline('.').';')<CR>
nnoremap <leader>q <C-w>q<CR>
nnoremap <leader>w :w<CR>
nnoremap <silent> <leader>d :bp\|bd #<CR>
nnoremap <leader>c :cd %:p:h<CR>
cnoreabbrev ci( %ci(
cnoreabbrev ci) %ci)
cnoreabbrev ci[ %ci[
cnoreabbrev ci[ %ci]
cnoreabbrev ci{ %ci{
cnoreabbrev ci} %ci}
"***************************
" AUTOCOMMANDS
"***************************
" Auto-source .vimrc
augroup Vimrc
au!
au bufwritepost .vimrc source $MYVIMRC
augroup end
" Filetype-specific settings
augroup Filetypes
au!
"au FileType c nmap <leader>r :SCCompileRun<CR>
au FileType c nmap <leader>r :make\|!./%:r<CR>
au FileType c setlocal sw=2 sts=2
au FileType ruby nmap <leader>r :call RunByFiletype("ruby")<CR>
augroup end
EDIT 2 - Added pictures (sorry for the small size)
On startup
After sourcing .vimrc (the empty scrollbar container appears)
After running :set guioptions+=b (the horizontal scrolling bar is added to the container)
After running :set guioptions-=b (the horizontal container disappears)
After running :set gfn=Source\ Code\ Pro\ 10 (the bar reappears)
Here is Vim in a terminal
Another example where I've tiled GVim to the upper right corner
The normal edge size is on the left, while on the right, is a forced edge size due to tiling and font height.
Ended up creating a block to initialize the GUI-specific options I wanted to set at startup and to not be subject of resourcing of .vimrc. I will no longer see the "instant effect" of changing the guifont in $MYVIMRC, but this will keep the bottom-bar from appearing.
if has('gui_running')
if has('vim_starting')
set gfn=Source\ Code\ Pro\ 10
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions+=c
endif
endif
When I use the hjkl movement keys (hnei for me, as I've mapped these keys to work with the colemak layout) in normal mode, they move perfectly fine without any noticeable delay. However, in visual mode, the key corresponding to moving right ("i" for me), causes a really annoying lag. I have a feeling that one of the plugins I installed may have mapped a command to be a combination of "i" and another key, but I can't find it anywhere. Why is this lag happening? More specifically, am I missing something in my vimrc or plugins that may be conflicting with my movement mappings?
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-surround'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kchmck/vim-coffee-script'
Plugin 'tpope/vim-repeat'
Plugin 'kien/ctrlp.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'bling/vim-airline'
Plugin 'godlygeek/tabular'
Plugin 'tomasr/molokai'
Plugin 'ervandew/supertab'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'docunext/closetag.vim'
Plugin 'mattn/emmet-vim'
" HNEI arrows. Swap 'gn'/'ge' and 'n'/'e'.
noremap n gj|noremap e gk|noremap i l|noremap gn j|noremap ge k
nnoremap <silent> jj :noh<CR>
let g:mapleader=","
noremap <space> i
" Last search.
nnoremap k n
nnoremap K N
" BOL/EOL/Join Lines.
noremap l ^|noremap L $|noremap <C-l> J
" _r_ = inneR text objects.
onoremap r i
" Switch tabs.
nnoremap <C-i> <C-PageDown>|nnoremap <C-h> <C-PageUp>
" SwiS1S1tch panes.
noremap H <C-w>h|noremap I <C-w>l|noremap N <C-w>j|noremap E <C-w>k
" Scroll up/down.
noremap = <C-y>|noremap - <C-e>
nnoremap ; :
nnoremap : ;
inoremap jj <Esc>
noremap U <C-r>
nnoremap + <C-a>|nnoremap - <C-x>
noremap ' `|noremap ` '
vnoremap s S
nnoremap <CR> o<Esc>
noremap _ <c-_><c-_>
vnoremap <Leader>a :Tabularize /:<CR>
" Vim Display.
set t_Co=256
set shortmess+=I
set display+=lastline
set showtabline=1
set backspace=2
set textwidth=0
" Text Display.
syntax on
set number
set guicursor+=a:blinkon0
set hlsearch
set wrap
set lbr
set showbreak=···\
" Two-space tabs.
set expandtab
set smarttab
" Editing.
set autoindent
set whichwrap+=<,>,h,l,b,s,[,]
set splitbelow|set splitright
" Searching and matching.
set incsearch
set ignorecase|set smartcase
set gdefault
set showmatch
" System.
filetype plugin indent on
set mouse=a
set t_RV=1
set history=1000
set wildmenu
set wildmode=longest,full
au BufEnter * set ignorecase
set nohidden
set laststatus=2
let g:EasyMotion_do_mapping = 0
nmap f <Plug>(easymotion-s)
let g:EasyMotion_smartcase = 1
nnoremap <silent> <Leader><Leader> :NERDTreeTabsToggle<CR>
:verbose vmap i
will tell you all visual mode mappings starting with i (and where it got defined, so you can identify the plugin). As most "inner" text objects start with i and are also available in visual mode, this conflict is indeed likely.
This is a really strange issue and it's been driving me insane. At one point, in my .vimrc file, I had a line that looked like the following:
nnoremap <tab> gg=G''
which I used to re-indent my whole file. Time goes on and I decide that I want to use tab like %, to move between open/close tags/parens/etc. So I remove the line above, and remap the command to control-i (like Eclipse) and replace it with
nnoremap <tab> %
vnoremap <tab> %
I save the file, source it, close vim, restart my computer, do whatever, but regardless of what I do, pressing tab still indents the entire file. When I check the mapping with
:verbose map <tab>
The output I get is:
v <Tab> * %
Last set from ~/.vimrc
n <Tab> * gg=G''
Last set from ~/.vimrc
Similarly, if I try
:verbose nnoremap <tab>
I get:
n <Tab> * gg=G''
Last set from ~/.vimrc
I'm really not sure what's going on here, that mapping most certainly does not exist any more. Here is my .vimrc:
set nocompatible " be iMproved
filetype off " required!
let mapleader = ","
nnoremap <leader><space> :noh<cr>
nnoremap ; :
nnoremap <leader>v <C-w>v<C-w>l
nnoremap <leader>h <C-w>s<C-w>j
nnoremap <leader>f :CtrlP<CR>
nnoremap <tab> %
vnoremap <tab> %
inoremap jk <ESC>l
nnoremap <C-i> gg=G''
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
syntax enable
set t_Co=16
set background=dark
set tabstop=2
set shiftwidth=2
set softtabstop=2
set smarttab
set expandtab
set number
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
set nobackup
set noswapfile
set smartindent
set hidden
set wildmenu
set nonumber
set nowrap
set relativenumber
set timeoutlen=100
set backspace=indent,eol,start
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-rails.git'
Bundle 'tpope/vim-endwise.git'
Bundle 'tpope/vim-surround.git'
Bundle 'scrooloose/nerdcommenter.git'
Bundle 'scrooloose/syntastic.git'
Bundle 'jiangmiao/auto-pairs.git'
Bundle 'kien/ctrlp.vim'
Bundle 'altercation/vim-colors-solarized.git'
colorscheme solarized
" vim-scripts repos
Bundle 'bufexplorer.zip'
Bundle 'HTML-AutoCloseTag'
Bundle 'matchit.zip'
Bundle 'ruby-matchit'
Bundle 'Rename2'
filetype plugin indent on " required!
filetype indent on
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
<c-i> and <tab> share the same key codes so they can not be distinguished from each other.
Use a different mapping than <c-i>. I suggest you use leader, e.g. nnoremap <leader>i gg=G''
For more help see:
:h keycodes
:h mapleader