Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
141 lines (128 sloc) 3.19 KB
" General
set nocompatible
set nobackup
set nowritebackup
set noswapfile
set viminfo^=%
" Interface
set number
set cul
set nostartofline
set noshowcmd
set noshowmode
set noruler
set tildeop
set title
set clipboard+=unnamed
set scrolloff=10
set hlsearch
set incsearch
set ignorecase
set autoread
autocmd FocusGained,BufEnter * :silent! !
set colorcolumn=81
autocmd FileType gitcommit set colorcolumn=51,73
" Formatting
set nowrap
autocmd FileType markdown setlocal wrap
autocmd FileType html setlocal wrap
set backspace=2
set tabstop=2
set shiftwidth=2
set softtabstop=2
set smarttab
set expandtab
set autoindent
set copyindent
set preserveindent
set nosmartindent
set nocindent
set list
set listchars=tab:——,trail:·,space:·,nbsp:·,eol:¬,extends:⇢,precedes:
set encoding=utf-8 nobomb
set fileencoding=utf-8
" Moving
noremap j gj
noremap k gk
" True colors
if (empty($TMUX))
if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
if (has("termguicolors"))
set termguicolors
endif
endif
" Plugins
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" General
Plugin 'VundleVim/Vundle.vim'
Plugin 'rakr/vim-one'
Plugin 'tpope/vim-sleuth'
Plugin 'tpope/vim-surround'
Plugin 'tomtom/tcomment_vim'
Plugin 'ervandew/supertab'
Plugin 'gregsexton/MatchTag'
Plugin 'jiangmiao/auto-pairs'
Plugin 'airblade/vim-gitgutter'
Plugin 'matze/vim-move'
let g:move_key_modifier = 'C'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'junegunn/goyo.vim'
nnoremap <C-g> :Goyo<CR>
" Airline
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
set laststatus=2
set ttimeoutlen=0
let g:airline_theme = 'one'
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline#extensions#ale#enabled = 0
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_min_count = 2
let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#tabline#show_tab_nr = 0
" Search
Plugin 'rking/ag.vim'
let g:ag_highlight = 1
Plugin 'ctrlpvim/ctrlp.vim'
let g:ctrlp_use_caching = 0
let g:ctrlp_show_hidden = 1
let g:ctrlp_open_new_file = 't'
let g:ctrlp_match_window = 'order:ttb,max:20,results:20'
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
" Linting
Plugin 'w0rp/ale'
let g:ale_sign_error = '>'
let g:ale_sign_warning = '-'
let g:ale_set_highlights = 0
let g:ale_lint_on_text_changed = 'never'
if executable("standard")
let g:ale_linters = {'javascript': ['standard', 'flow']}
endif
" Languages
Plugin 'elzr/vim-json'
let g:vim_json_syntax_conceal = 0
Plugin 'othree/yajs.vim'
Plugin 'othree/es.next.syntax.vim'
Plugin 'mxw/vim-jsx'
let g:jsx_ext_required = 0
Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'rhysd/vim-gfm-syntax'
let g:markdown_fenced_languages = ['sh', 'html', 'css', 'json', 'yaml', 'js=javascript']
Plugin 'jxnblk/vim-mdx-js'
Plugin 'othree/html5.vim'
Plugin 'groenewege/vim-less'
Plugin 'ap/vim-css-color'
Plugin 'stephenway/postcss.vim'
Plugin 'reasonml-editor/vim-reason-plus'
Plugin 'leafgarland/typescript-vim'
call vundle#end()
" Syntax colors
filetype plugin indent on
syntax enable
set background=light
colorscheme one