Skip to content

Instantly share code, notes, and snippets.

@jdbit
Last active November 10, 2022 09:18
Show Gist options
  • Save jdbit/4a778636f8117689bd5d9ada98827b9d to your computer and use it in GitHub Desktop.
Save jdbit/4a778636f8117689bd5d9ada98827b9d to your computer and use it in GitHub Desktop.
My vim config
"set nocompatible " be iMproved, Vundle required
filetype off " Vundle required
syntax on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" My plugins
Plugin 'scrooloose/nerdtree'
Plugin 'klen/python-mode'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Snippets
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
" Surrounding
Plugin 'tpope/vim-surround'
" FZF
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
" themes
Plugin 'morhetz/gruvbox'
Plugin 'easymotion/vim-easymotion'
" Optional:
Plugin 'honza/vim-snippets'
call vundle#end() " Vundle required
filetype plugin indent on " Vundle required
nnoremap <C-p> :Files<Cr>
autocmd! bufwritepost .vimrc source %
set clipboard=unnamed
set t_Co=256
" colorscheme xoria256
colorscheme gruvbox
set background=dark
set number " display number of row
map <C-n> :NERDTreeToggle<CR> " open NERDTree with C-n
" let g:airline#extensions#tabline#enabled = 1 " display open files tabs on top
let g:airline#extensions#tabline#formatter = 'jsformatter'
" Just show the filename (no path) in the tab
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#branch#format = 0
set nopaste
set expandtab
set tabstop=4
set shiftwidth=4
set tw=0
set nowrap
set fo-=t
set colorcolumn=80
highlight ColorColumn ctermbg=233
set mouse=a " move cursor to the mouse pointer
let mapleader=","
set nobackup
set nowritebackup
set noswapfile
imap jj <ESC>
map <F2> :retab <CR> :wq! <CR
vmap Q gq
nmap Q gqap
" Toggle relative line number
nmap <C-L><C-L> :set invrelativenumber<CR>
noremap <leader>1 1gt
noremap <leader>2 2gt
noremap <leader>3 3gt
noremap <leader>4 4gt
noremap <leader>5 5gt
noremap <leader>6 6gt
noremap <leader>7 7gt
noremap <leader>8 8gt
" copy paste to system clipboard
noremap <Leader>y "+y
noremap <Leader>p "+p
map <leader>n :NERDTreeToggle<CR>
set nocompatible
filetype on
filetype plugin on
au BufRead *.tpl set ft=html
au BufNewFile *.tpl set ft=html
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
" Highlighting and jump to search term when searching /
set incsearch
set hlsearch
let g:snipMate = { 'snippet_version' : 1 }
@jdbit
Copy link
Author

jdbit commented Jun 24, 2019

Install

git clone https://gist.github.com/4a778636f8117689bd5d9ada98827b9d.git ~/.vim && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment