Switching to Neovim and moving .vim directory into repo
This commit is contained in:
parent
8c3336072d
commit
264c7ae63f
2
.bashrc
2
.bashrc
@ -46,7 +46,7 @@ alias gobrowser="godoc -http=:6060 -analysis=\"type,pointer\" -play=true -ex=tru
|
|||||||
# (f)ind by (n)ame
|
# (f)ind by (n)ame
|
||||||
# usage: fn foo
|
# usage: fn foo
|
||||||
# to find all files containing 'foo' in the name
|
# to find all files containing 'foo' in the name
|
||||||
function fn() {
|
function fn() {
|
||||||
if [ $# -eq 2 ]; then
|
if [ $# -eq 2 ]; then
|
||||||
sudo find $1 -name $2
|
sudo find $1 -name $2
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
|
@ -8,6 +8,9 @@ set-option -g status-right-length 90
|
|||||||
set-option -g status-left "#(~/.tmux-powerline/status-left.sh)"
|
set-option -g status-left "#(~/.tmux-powerline/status-left.sh)"
|
||||||
set-option -g status-right "#(~/.tmux-powerline/status-right.sh)"
|
set-option -g status-right "#(~/.tmux-powerline/status-right.sh)"
|
||||||
|
|
||||||
|
# Fix for weird characters right after pressing escape in neovim
|
||||||
|
set -s escape-time 0
|
||||||
|
|
||||||
### Copy / Paste
|
### Copy / Paste
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
bind-key -t vi-copy 'v' begin-selection
|
bind-key -t vi-copy 'v' begin-selection
|
||||||
@ -55,4 +58,4 @@ set-option -g display-panes-active-colour blue #blue
|
|||||||
set-option -g display-panes-colour brightred #orange
|
set-option -g display-panes-colour brightred #orange
|
||||||
|
|
||||||
# clock
|
# clock
|
||||||
set-window-option -g clock-mode-colour green #green
|
set-window-option -g clock-mode-colour green #green
|
||||||
|
2037
.vim/autoload/plug.vim
Normal file
2037
.vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
4
.vim/backups/.gitignore
vendored
Normal file
4
.vim/backups/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
1117
.vim/colors/solarized.vim
Normal file
1117
.vim/colors/solarized.vim
Normal file
File diff suppressed because it is too large
Load Diff
4
.vim/plugged/.gitignore
vendored
Normal file
4
.vim/plugged/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
BIN
.vim/spell/en.utf-8.spl
Normal file
BIN
.vim/spell/en.utf-8.spl
Normal file
Binary file not shown.
BIN
.vim/spell/en.utf-8.sug
Normal file
BIN
.vim/spell/en.utf-8.sug
Normal file
Binary file not shown.
4
.vim/swaps/.gitignore
vendored
Normal file
4
.vim/swaps/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
111
.vimrc
111
.vimrc
@ -1,34 +1,25 @@
|
|||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
"
|
||||||
"NeoBundle Setup {{{1
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
if has('vim_starting')
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
set nocompatible " Be iMproved
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
filetype off " turn this off for a minute
|
autocmd VimEnter * PlugInstall | source $MYVIMRC
|
||||||
|
|
||||||
" Required:
|
|
||||||
set runtimepath+=/home/tgrosinger/.vim/bundle/neobundle.vim/
|
|
||||||
endif
|
endif
|
||||||
|
call plug#begin()
|
||||||
|
|
||||||
" Required:
|
" Plug packages without settings {{{1
|
||||||
call neobundle#begin(expand('/home/tgrosinger/.vim/bundle'))
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
" Let NeoBundle manage NeoBundle
|
Plug 'tpope/vim-repeat'
|
||||||
" Required:
|
Plug 'tpope/vim-fugitive'
|
||||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
Plug 'reedes/vim-wordy'
|
||||||
|
Plug 'scrooloose/syntastic'
|
||||||
" NeoBundle Packages without settings {{{1
|
Plug 'idanarye/vim-merginal'
|
||||||
NeoBundle 'tpope/vim-surround'
|
Plug 'godlygeek/tabular'
|
||||||
NeoBundle 'tpope/vim-commentary'
|
Plug 'airblade/vim-gitgutter'
|
||||||
NeoBundle 'tpope/vim-repeat'
|
|
||||||
NeoBundle 'tpope/vim-fugitive'
|
|
||||||
NeoBundle 'reedes/vim-wordy'
|
|
||||||
NeoBundle 'scrooloose/syntastic'
|
|
||||||
NeoBundle 'idanarye/vim-merginal'
|
|
||||||
NeoBundle 'godlygeek/tabular'
|
|
||||||
NeoBundle 'airblade/vim-gitgutter'
|
|
||||||
|
|
||||||
" Ctrl-p {{{1
|
" Ctrl-p {{{1
|
||||||
NeoBundle 'kien/ctrlp.vim'
|
Plug 'kien/ctrlp.vim'
|
||||||
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
|
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
|
||||||
let g:ctrlp_user_command = {
|
let g:ctrlp_user_command = {
|
||||||
@ -39,30 +30,25 @@ let g:ctrlp_user_command = {
|
|||||||
\ }
|
\ }
|
||||||
|
|
||||||
" YouCompleteMe {{{1
|
" YouCompleteMe {{{1
|
||||||
NeoBundle 'Valloric/YouCompleteMe', {
|
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
|
||||||
\ 'build' : {
|
|
||||||
\ 'unix' : './install.sh --gocode-completer',
|
|
||||||
\ 'linux' : './install.sh --gocode-completer',
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
let g:ycm_complete_in_strings = 0
|
let g:ycm_complete_in_strings = 0
|
||||||
let g:ycm_collect_identifiers_from_tags_files = 1
|
let g:ycm_collect_identifiers_from_tags_files = 1
|
||||||
let g:ycm_seed_identifiers_with_syntax = 1
|
let g:ycm_seed_identifiers_with_syntax = 1
|
||||||
|
|
||||||
" JSON Support {{{1
|
" JSON Support {{{1
|
||||||
NeoBundle 'elzr/vim-json'
|
Plug 'elzr/vim-json'
|
||||||
let g:vim_json_syntax_conceal = 0
|
let g:vim_json_syntax_conceal = 0
|
||||||
|
|
||||||
" Tmux Integration {{{1
|
" Tmux Integration {{{1
|
||||||
NeoBundle 'christoomey/vim-tmux-navigator'
|
Plug 'christoomey/vim-tmux-navigator'
|
||||||
nnoremap <silent> <C-Left> :TmuxNavigateLeft<cr>
|
nnoremap <silent> <C-Left> :TmuxNavigateLeft<cr>
|
||||||
nnoremap <silent> <C-Down> :TmuxNavigateDown<cr>
|
nnoremap <silent> <C-Down> :TmuxNavigateDown<cr>
|
||||||
nnoremap <silent> <C-Up> :TmuxNavigateUp<cr>
|
nnoremap <silent> <C-Up> :TmuxNavigateUp<cr>
|
||||||
nnoremap <silent> <C-Right> :TmuxNavigateRight<cr>
|
nnoremap <silent> <C-Right> :TmuxNavigateRight<cr>
|
||||||
|
|
||||||
" Tab Completion {{{1
|
" Tab Completion {{{1
|
||||||
NeoBundle 'ervandew/supertab'
|
Plug 'ervandew/supertab'
|
||||||
NeoBundle 'sirver/ultisnips'
|
Plug 'sirver/ultisnips'
|
||||||
|
|
||||||
" make YCM compatible with UltiSnips (using supertab)
|
" make YCM compatible with UltiSnips (using supertab)
|
||||||
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
||||||
@ -75,17 +61,24 @@ let g:UltiSnipsJumpForwardTrigger = "<tab>"
|
|||||||
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>""
|
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>""
|
||||||
|
|
||||||
" Color Scheme {{{1
|
" Color Scheme {{{1
|
||||||
NeoBundle 'altercation/vim-colors-solarized'
|
Plug 'altercation/vim-colors-solarized'
|
||||||
|
let g:solarized_termcolors=256
|
||||||
|
let g:solarized_termtrans=1
|
||||||
|
let g:solarized_contrast="normal"
|
||||||
|
let g:solarized_visibility="normal"
|
||||||
|
set background=dark
|
||||||
|
colorscheme solarized
|
||||||
|
highlight ColorColumn ctermbg=0 guibg=#eee8d5
|
||||||
|
|
||||||
|
|
||||||
" DelimitMate {{{1
|
" DelimitMate {{{1
|
||||||
NeoBundle 'Raimondi/delimitMate'
|
Plug 'Raimondi/delimitMate'
|
||||||
let delimitMate_expand_cr = 1
|
let delimitMate_expand_cr = 1
|
||||||
|
|
||||||
" Airline {{{1
|
" Airline {{{1
|
||||||
NeoBundle 'bling/vim-airline'
|
Plug 'bling/vim-airline'
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
let g:airline#extensions#tabline#enabled = 1 " Tab bar at top
|
let g:airline#extensions#tabline#enabled = 1 " Tab bar at top
|
||||||
set t_Co=256
|
|
||||||
if !exists('g:airline_symbols')
|
if !exists('g:airline_symbols')
|
||||||
let g:airline_symbols = {}
|
let g:airline_symbols = {}
|
||||||
endif
|
endif
|
||||||
@ -101,40 +94,33 @@ if has('statusline')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Golang Support {{{1
|
" Golang Support {{{1
|
||||||
NeoBundle 'fatih/vim-go'
|
Plug 'fatih/vim-go'
|
||||||
au FileType go nmap <Leader>gb <Plug>(go-doc)
|
au FileType go nmap <Leader>gb <Plug>(go-doc)
|
||||||
au FileType go nmap <Leader>gd <Plug>(go-def-vertical)
|
au FileType go nmap <Leader>gd <Plug>(go-def-vertical)
|
||||||
au FileType go nmap <Leader>gi <Plug>(go-info)
|
au FileType go nmap <Leader>gi <Plug>(go-info)
|
||||||
au FileType go nmap <Leader>gl <Plug>(go-metalinter)
|
au FileType go nmap <Leader>gl <Plug>(go-metalinter)
|
||||||
let g:go_auto_type_info = 0
|
let g:go_auto_type_info = 0
|
||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck', 'varcheck', 'aligncheck', 'dupl', 'ineffassign']
|
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck', 'varcheck', 'aligncheck', 'ineffassign']
|
||||||
|
"let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck', 'varcheck', 'aligncheck', 'dupl', 'ineffassign']
|
||||||
|
|
||||||
" Python Support {{{1
|
" Python Support {{{1
|
||||||
"NeoBundle 'klen/python-mode'
|
"Plug 'klen/python-mode'
|
||||||
"au FileType python let g:pymode_doc_bind = "<Leader>gb"
|
"au FileType python let g:pymode_doc_bind = "<Leader>gb"
|
||||||
"au FileType python let g:pymode_rope_goto_definition_bind = "<Leader>gd"
|
"au FileType python let g:pymode_rope_goto_definition_bind = "<Leader>gd"
|
||||||
"au FileType python let g:pymode_folding = 0
|
"au FileType python let g:pymode_folding = 0
|
||||||
|
|
||||||
" NeoBundle Cleanup {{{1
|
call plug#end()
|
||||||
" Required:
|
|
||||||
call neobundle#end()
|
|
||||||
|
|
||||||
" Required:
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" If there are uninstalled bundles found on startup,
|
|
||||||
" this will conveniently prompt you to install them.
|
|
||||||
NeoBundleCheck
|
|
||||||
|
|
||||||
" Appearance {{{1
|
" Appearance {{{1
|
||||||
set background=dark
|
|
||||||
set cursorline " Highlight the current line
|
set cursorline " Highlight the current line
|
||||||
set showmatch " Show matching brackets/parenthesis
|
set showmatch " Show matching brackets/parenthesis
|
||||||
set hlsearch " Highlight search terms
|
set hlsearch " Highlight search terms
|
||||||
syntax on " Turn on syntax highlighting
|
syntax on " Turn on syntax highlighting
|
||||||
set spell " Turn on spellchecking
|
set spell " Turn on spellchecking
|
||||||
set number " Turn on line numbers
|
set number " Turn on line numbers
|
||||||
|
set mouse= " Disable mouse support
|
||||||
|
|
||||||
let g:CSApprox_hook_post = ['hi clear SignColumn']
|
let g:CSApprox_hook_post = ['hi clear SignColumn']
|
||||||
highlight clear CursorLineNr " Remove highlight color from current line number
|
highlight clear CursorLineNr " Remove highlight color from current line number
|
||||||
@ -147,15 +133,6 @@ set colorcolumn=+1
|
|||||||
set list " Highlight white-space characters
|
set list " Highlight white-space characters
|
||||||
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " but only the ones we don't want
|
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " but only the ones we don't want
|
||||||
|
|
||||||
if filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
|
|
||||||
let g:solarized_termcolors=256
|
|
||||||
let g:solarized_termtrans=1
|
|
||||||
let g:solarized_contrast="normal"
|
|
||||||
let g:solarized_visibility="normal"
|
|
||||||
color solarized
|
|
||||||
endif
|
|
||||||
highlight ColorColumn ctermbg=0 guibg=#eee8d5
|
|
||||||
|
|
||||||
" Tabs {{{1
|
" Tabs {{{1
|
||||||
noremap <leader>1 1gt
|
noremap <leader>1 1gt
|
||||||
noremap <leader>2 2gt
|
noremap <leader>2 2gt
|
||||||
@ -184,8 +161,13 @@ set tabstop=4
|
|||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set expandtab
|
set expandtab
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set autoindent
|
set autoindent " Indent on paste
|
||||||
set smartindent
|
set smartindent " Indent intelligently
|
||||||
|
set nojoinspaces " Collapse spaces after sentences
|
||||||
|
|
||||||
|
" Don't exit visual mode when indenting
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
|
||||||
" Search {{{1
|
" Search {{{1
|
||||||
set ignorecase
|
set ignorecase
|
||||||
@ -197,7 +179,6 @@ set backup
|
|||||||
set backupdir=$HOME/.vim/backups
|
set backupdir=$HOME/.vim/backups
|
||||||
set directory=$HOME/.vim/swaps
|
set directory=$HOME/.vim/swaps
|
||||||
set undodir=$HOME/.vim/undo
|
set undodir=$HOME/.vim/undo
|
||||||
|
|
||||||
if has('persistent_undo')
|
if has('persistent_undo')
|
||||||
set undofile " So is persistent undo ...
|
set undofile " So is persistent undo ...
|
||||||
set undolevels=1000 " Maximum number of changes that can be undone
|
set undolevels=1000 " Maximum number of changes that can be undone
|
||||||
|
37
install.sh
37
install.sh
@ -26,8 +26,7 @@ REPO_TAR="${GIT_REPO_BASE}/archive/master.tar.gz"
|
|||||||
|
|
||||||
# Remove a file if it exists then create a symlink to the one contained in ${REPO_DIR}
|
# Remove a file if it exists then create a symlink to the one contained in ${REPO_DIR}
|
||||||
function linkFile() {
|
function linkFile() {
|
||||||
if [ -e $1 ]; then rm -rf $1; fi
|
ln -fns ${REPO_DIR}/$1 $1;
|
||||||
ln -s ${REPO_DIR}/$1 $1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a directory named by first parameter. Delete directory first if it already exists.
|
# Create a directory named by first parameter. Delete directory first if it already exists.
|
||||||
@ -62,12 +61,10 @@ function performSetup() {
|
|||||||
linkFile ".bashrc"
|
linkFile ".bashrc"
|
||||||
|
|
||||||
echo "Linking vim..."
|
echo "Linking vim..."
|
||||||
|
linkFile ".vim"
|
||||||
linkFile ".vimrc"
|
linkFile ".vimrc"
|
||||||
createDirectory ".vim"
|
linkFile ".nvim"
|
||||||
createDirectory ".vim/swaps"
|
linkFile ".nvimrc"
|
||||||
createDirectory ".vim/backups"
|
|
||||||
echo "You should install Neobundle to install your Vim plugins. Use this command:"
|
|
||||||
echo "curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh"
|
|
||||||
|
|
||||||
echo "Linking Git..."
|
echo "Linking Git..."
|
||||||
linkFile ".gitconfig"
|
linkFile ".gitconfig"
|
||||||
@ -78,22 +75,30 @@ function performSetup() {
|
|||||||
echo "Linking inputrc..."
|
echo "Linking inputrc..."
|
||||||
linkFile ".inputrc"
|
linkFile ".inputrc"
|
||||||
|
|
||||||
echo "Linking peco..."
|
|
||||||
createDirectory ".config/peco"
|
|
||||||
linkFile ".config/peco/config.json"
|
|
||||||
|
|
||||||
echo "Linking Xmodmap..."
|
|
||||||
linkFile ".Xmodmap"
|
|
||||||
|
|
||||||
echo "Linking i3..."
|
echo "Linking i3..."
|
||||||
createDirectory ".i3"
|
linkFile ".i3"
|
||||||
linkFile ".i3status.conf"
|
linkFile ".i3status.conf"
|
||||||
linkFile ".i3/config"
|
|
||||||
|
|
||||||
echo "Linking bin files"
|
echo "Linking bin files"
|
||||||
|
linkFile "bin/git-safedel"
|
||||||
linkFile "bin/diff-highlight"
|
linkFile "bin/diff-highlight"
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
echo "Installing some default applications"
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/unstable
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y python-dev python-pip python3-dev python3-pip neovim
|
||||||
|
sudo pip3 install -U neovim
|
||||||
|
sudo pip2 install -U neovim
|
||||||
|
|
||||||
|
echo "Setting defaults"
|
||||||
|
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
||||||
|
sudo update-alternatives --config vi
|
||||||
|
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
||||||
|
sudo update-alternatives --config vim
|
||||||
|
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
||||||
|
sudo update-alternatives --config editor
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user