mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 09:22:19 +00:00
vimrc: install vim-plug, configure for Go
This commit is contained in:
parent
a4aa2e15a5
commit
642f451836
1 changed files with 34 additions and 2 deletions
36
vim/.vimrc
36
vim/.vimrc
|
@ -1,3 +1,22 @@
|
||||||
|
""" Plug-in management
|
||||||
|
" Install vim-plug if not found
|
||||||
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Run PlugInstall if there are missing plugins
|
||||||
|
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
|
\| PlugInstall --sync | source $MYVIMRC
|
||||||
|
\| endif
|
||||||
|
|
||||||
|
" Load Plug-ins
|
||||||
|
call plug#begin()
|
||||||
|
Plug 'fatih/vim-go'
|
||||||
|
call plug#end()
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
" Tmux integration to switch panes with Ctrl+{hjkl}
|
" Tmux integration to switch panes with Ctrl+{hjkl}
|
||||||
if exists('$TMUX')
|
if exists('$TMUX')
|
||||||
function! TmuxOrSplitSwitch(wincmd, tmuxdir)
|
function! TmuxOrSplitSwitch(wincmd, tmuxdir)
|
||||||
|
@ -25,7 +44,20 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" coding preferences
|
" coding preferences
|
||||||
|
filetype off
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
set noautoindent smarttab ts=2 sw=2 expandtab
|
set backspace=indent,eol,start
|
||||||
set showmatch
|
set noautoindent
|
||||||
|
set noswapfile
|
||||||
|
set number
|
||||||
set ruler
|
set ruler
|
||||||
|
set showmatch
|
||||||
|
set smarttab
|
||||||
|
set ts=2 sw=2 sts=2 expandtab
|
||||||
|
|
||||||
|
let mapleader=","
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd FileType go set ts=2 sw=2 sts=2 noet nolist autowrite
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue