Skip to content

Instantly share code, notes, and snippets.

@rhagni
Created April 11, 2018 00:00
Show Gist options
  • Save rhagni/97094e4d46122d9b45d684f31c5dd56b to your computer and use it in GitHub Desktop.
Save rhagni/97094e4d46122d9b45d684f31c5dd56b to your computer and use it in GitHub Desktop.
Personal .vimrc
let g:python_host_prog="C:\\bin\\python3\\python.exe"
let g:python3_host_prog="C:\\bin\\python3\\python.exe"
set nocompatible
filetype off
set rtp+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin("\$HOME/.vim/bundle/")
Plugin 'VundleVim/Vundle.vim'
" Customize
"Bundle "xolox/vim-misc"
"Bundle "xolox/vim-colorscheme-switcher"
Bundle "jonathanfilip/vim-lucius"
let g:lucius_style="dark"
let g:lucius_contrast="low"
let g:lucius_contrast_bg="high"
"Bundle "Lokaltog/vim-powerline"
"Bundle "powerline/powerline"
" let g:Powerline_symbols="fancy"
Bundle "vim-airline/vim-airline"
let g:airline_powerline_fonts = 1
Bundle "vim-airline/vim-airline-themes"
let g:airline_theme="lucius"
Bundle "powerline/fonts"
set guifont=Source\ Code\ Pro\ for\ Powerline:h11
" Auto-complete generic
"Bundle "Shougo/deoplete.nvim"
" let g:deoplete#enable_at_startup = 1
"Bundle "roxma/nvim-yarp"
"Bundle "roxma/vim-hug-neovim-rpc"
Bundle "Shougo/neocomplete.vim"
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 1
inoremap <expr><C-g> neocomplete#undo_completion()
inoremap <expr><C-l> neocomplete#complete_common_string()
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
"Bundle "Valloric/YouCompleteMe"
"Bundle "ternjs/tern_for_vim"
"Bundle "ahayman/vim-nodejs-complete"
" .editorconfig
"Bundle "editorconfig/editorconfig-vim"
Bundle "sgur/vim-editorconfig"
" File explorer
Bundle "scrooloose/nerdtree"
" Map
Bundle "majutsushi/tagbar"
" Movimentation
Bundle "easymotion/vim-easymotion"
" Easy "surroundings" edit
" {action}s{from}{to} | {action}=(Change|Delete)
Bundle "tpope/vim-surround"
" Snipts
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "garbas/vim-snipmate"
imap <C-J> <esc>a<Plug>snipMateNextOrTrigger
smap <C-J> <Plug>snipMateNextOrTrigger
Bundle "honza/vim-snippets"
" Version control: Generic
"Bundle "mhinz/vim-signify"
" Version control: Git
Bundle "airblade/vim-gitgutter"
" Emmit
" <c-y>,
Bundle "mattn/emmet-vim"
" Lang: PHP
Bundle "StanAngeloff/php.vim"
let g:php_syntax_extensions_enable = 1
function! PhpSyntaxOverride()
hi! def link phpDocTags phpDefine
hi! def link phpDocParam phpType
endfunction
augroup phpSyntaxOverride
autocmd!
autocmd FileType php call PhpSyntaxOverride()
augroup END
" Auto-complete to PHP
Bundle "shawncplus/phpcomplete.vim"
" Lang: Go
Bundle "fatih/vim-go"
" Auto-complete to Go
Plugin 'nsf/gocode', {'rtp': 'vim/'}
" Lang: Javascript
Bundle "pangloss/vim-javascript"
let g:javascript_plugin_flow = 1
Bundle "jelera/vim-javascript-syntax"
" Lang: JSON
Bundle "leshill/vim-json"
" Lang: NodeJS
Bundle "moll/vim-node"
" Lang: (React-)JSX
Bundle "mxw/vim-jsx"
" Lang: Typescript
Bundle "leafgarland/typescript-vim"
" Something about turn VIM into Typescript IDE ¯\_(ツ)_/¯
Bundle "Quramy/tsuquyomi"
" Typing: DefinitelyTyped
Bundle "Quramy/vim-dtsm"
" Typing: Typings
Bundle "mhartington/vim-typings"
" Syntax checking
Bundle "vim-syntastic/syntastic"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
let g:syntastic_php_php_exec = "php7"
" Syntax checking: XO (Javascript)
Bundle "sindresorhus/vim-xo"
let g:syntastic_javascript_checkers = ["xo"]
call vundle#end()
filetype plugin indent on
syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
"set expandtab
set nofoldenable
set nowrap
set backspace=indent,eol,start
set backspace=2
set number
set ruler
set showcmd
set showmode
set laststatus=2
set encoding=utf-8
set showmatch
set list
set list listchars=tab:\|\ ,nbsp:.,trail:.,extends:>,precedes:<
set incsearch
set hlsearch
set wrap
set linebreak
"set fileencodings=utf-8
set diffopt+=context:65535
set undofile
set undodir=$HOME/.vim/undofiles
set directory=$HOME/.vim/swapfiles
set colorcolumn=+1
set scrolloff=3
set sidescrolloff=7
set sidescroll=1
colorscheme lucius
set guioptions-=T
set guioptions-=m
set omnifunc=syntaxcomplete#Complete
set columns=85
" [Fix backspace mapping](http://vim.wikia.com/wiki/Backspace_and_delete_problems)
func Backspace()
if col('.') == 1
if line('.') != 1
return "\<ESC>kA\<Del>"
else
return ""
endif
else
return "\<Left>\<Del>"
endif
endfunc
inoremap <BS> <c-r>=Backspace()<CR>
" <A-j> Move current line to down
" <A-k> Move current line to up
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment