Skip to content

Instantly share code, notes, and snippets.

@poctek
Created August 4, 2016 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poctek/7a3a7f2d6273ee05518161d26e1da5cc to your computer and use it in GitHub Desktop.
Save poctek/7a3a7f2d6273ee05518161d26e1da5cc to your computer and use it in GitHub Desktop.
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/altercation/vim-colors-solarized.git'
Plug 'Raimondi/delimitMate'
Plug 'othree/html5.vim'
Plug 'othree/javascript-libraries-syntax.vim', { 'for': 'javascript' }
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'tomtom/tcomment_vim'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-bundler'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-fugitive'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-rails'
Plug 'vim-ruby/vim-ruby'
Plug 'https://github.com/tpope/vim-sensible.git'
Plug 'slim-template/vim-slim'
Plug 'tpope/vim-surround'
Plug 'kchmck/vim-coffee-script'
Plug 'bling/vim-bufferline'
Plug 'ajh17/VimCompletesMe'
Plug 'mattn/gist-vim'
Plug 'mattn/webapi-vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
call plug#end()
" Colorscheme
colorscheme solarized
set background=dark
filetype plugin indent on
syntax on
set t_Co=256
set number
set nocompatible
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
filetype plugin indent on
" Show hidden files in NerdTree
let NERDTreeShowHidden=1
au FocusLost User :wa
map <C-n> :NERDTreeToggle<CR>
" General
set relativenumber
set linebreak
set showbreak=+++
set textwidth=100
set showmatch " Highlight matching brace
set visualbell " Use visual bell (no beeping
set hidden
set nobackup
set noswapfile
set scrolloff=3
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set smartindent " Enable smart-indent
set expandtab
set tabstop=2 " Number of spaces per Tab
set shiftwidth=2 " Number of auto-indent spaces
set mouse-=a
" Advanced
set ruler " Show row and column ruler information
set autowriteall " Auto-write all file changes
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
set showcmd
" path to python interpreter
let g:ycm_path_to_python_interpreter = '/usr/bin/python'
" JavaScript libraries settings
let g:used_javascript_libs = 'jquery, angularjs, angularui, react'
" JSX highlighting
let g:jsx_ext_required = 0
:set hls! " toggle highlighting after the search
" Syntastic settings
let g:syntastic_ruby_checkers = ['rubocop']
let g:syntastic_sass_checkers = ['sass']
" Remove arrows
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" Stup tabs manipulation
nnoremap <Tab>j :bprev<CR>
nnoremap <Tab>k :bnext<CR>
nnoremap <Tab>n :buffers<CR>:buffer<SPACE>
" Remap escape to jj
inoremap jj <ESC>
" Show dots with indents
set list listchars=tab:\ \ ,trail:·
" Crontab settings
autocmd filetype crontab setlocal nobackup nowritebackup
" Swap current line and bottom line
map - ddp
" Swap current line and upper line
map _ kddpk
" Use : instead of ;
nmap ; :
" FZF config
map <C-p> :FZF<CR>
let $FZF_DEFAULT_COMMAND='ag -g ""'
" More symbols on the line
set tw=500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment