add auto-update/install vim script. update vimrc
This commit is contained in:
parent
b19d7bdd21
commit
038ed4dd54
146
shell/vimrc
146
shell/vimrc
|
@ -1,49 +1,49 @@
|
||||||
set nocompatible " be iMproved, required
|
set nocompatible " be iMproved, required
|
||||||
filetype off " required
|
"~ filetype off " required
|
||||||
|
"~
|
||||||
" set the runtime path to include Vundle and initialize
|
"~ " set the runtime path to include Vundle and initialize
|
||||||
set rtp+=~/.vim/bundle/Vundle.vim
|
"~ set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
call vundle#begin()
|
"~ call vundle#begin()
|
||||||
" alternatively, pass a path where Vundle should install plugins
|
"~ " alternatively, pass a path where Vundle should install plugins
|
||||||
"call vundle#begin('~/some/path/here')
|
"~ "call vundle#begin('~/some/path/here')
|
||||||
|
"~
|
||||||
" let Vundle manage Vundle, required
|
"~ " let Vundle manage Vundle, required
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
"~ Plugin 'VundleVim/Vundle.vim'
|
||||||
|
"~
|
||||||
" The following are examples of different formats supported.
|
"~ " The following are examples of different formats supported.
|
||||||
" Keep Plugin commands between vundle#begin/end.
|
"~ " Keep Plugin commands between vundle#begin/end.
|
||||||
" plugin on GitHub repo
|
"~ " plugin on GitHub repo
|
||||||
"##Plugin 'tpope/vim-fugitive'
|
"~ "##Plugin 'tpope/vim-fugitive'
|
||||||
" plugin from http://vim-scripts.org/vim/scripts.html
|
"~ " plugin from http://vim-scripts.org/vim/scripts.html
|
||||||
"##Plugin 'L9'
|
"~ "##Plugin 'L9'
|
||||||
" Git plugin not hosted on GitHub
|
"~ " Git plugin not hosted on GitHub
|
||||||
"##Plugin 'git://git.wincent.com/command-t.git'
|
"~ "##Plugin 'git://git.wincent.com/command-t.git'
|
||||||
" git repos on your local machine (i.e. when working on your own plugin)
|
"~ " git repos on your local machine (i.e. when working on your own plugin)
|
||||||
""Plugin 'file:///home/gmarik/path/to/plugin'
|
"~ ""Plugin 'file:///home/gmarik/path/to/plugin'
|
||||||
" The sparkup vim script is in a subdirectory of this repo called vim.
|
"~ " The sparkup vim script is in a subdirectory of this repo called vim.
|
||||||
" Pass the path to set the runtimepath properly.
|
"~ " Pass the path to set the runtimepath properly.
|
||||||
"##Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
"~ "##Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||||
" Install L9 and avoid a Naming conflict if you've already installed a
|
"~ " Install L9 and avoid a Naming conflict if you've already installed a
|
||||||
" different version somewhere else.
|
"~ " different version somewhere else.
|
||||||
""Plugin 'ascenator/L9', {'name': 'newL9'}
|
"~ ""Plugin 'ascenator/L9', {'name': 'newL9'}
|
||||||
|
"~
|
||||||
" ça va pas, il casse tout
|
"~ " ça va pas, il casse tout
|
||||||
"Plugin 'leafgarland/typescript-vim'
|
"~ "Plugin 'leafgarland/typescript-vim'
|
||||||
|
"~
|
||||||
" All of your Plugins must be added before the following line
|
"~ " All of your Plugins must be added before the following line
|
||||||
call vundle#end() " required
|
"~ call vundle#end() " required
|
||||||
filetype plugin indent on " required
|
"~ filetype plugin indent on " required
|
||||||
" To ignore plugin indent changes, instead use:
|
"~ " To ignore plugin indent changes, instead use:
|
||||||
"filetype plugin on
|
"~ "filetype plugin on
|
||||||
"
|
"~ "
|
||||||
" Brief help
|
"~ " Brief help
|
||||||
" :PluginList - lists configured plugins
|
"~ " :PluginList - lists configured plugins
|
||||||
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
"~ " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||||
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
"~ " :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
||||||
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
"~ " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
||||||
"
|
"~ "
|
||||||
" see :h vundle for more details or wiki for FAQ
|
"~ " see :h vundle for more details or wiki for FAQ
|
||||||
" Put your non-Plugin stuff after this line
|
"~ " Put your non-Plugin stuff after this line
|
||||||
|
|
||||||
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
@ -51,7 +51,7 @@ set showcmd
|
||||||
set wildmenu
|
set wildmenu
|
||||||
set backspace=eol,start,indent
|
set backspace=eol,start,indent
|
||||||
syntax on
|
syntax on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
set mouse=v
|
set mouse=v
|
||||||
set number
|
set number
|
||||||
colorscheme zellner
|
colorscheme zellner
|
||||||
|
@ -82,14 +82,15 @@ inoremap <F3> <c-o>:up<cr>
|
||||||
" remove trailing spaces
|
" remove trailing spaces
|
||||||
nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
||||||
" hit <enter> by mistake
|
" hit <enter> by mistake
|
||||||
inoremap <F7> <C-C>"_dd<bs>a
|
inoremap <F7> <C-C>"_dd<bs>a
|
||||||
" j but create newline
|
" j but create newline
|
||||||
inoremap <F9> <c-c>o
|
inoremap <F9> <c-c>o
|
||||||
set nospell
|
set nospell
|
||||||
" quick diff buffer vs save
|
" quick diff buffer vs save
|
||||||
command D :w !diff -u % -
|
command D :w !colordiff -u % -
|
||||||
|
command L :w !colordiff -u % - | less -R
|
||||||
" force unix mode on write
|
" force unix mode on write
|
||||||
""set ff=unix
|
""set ff=unix
|
||||||
" copy-paste using X buffers
|
" copy-paste using X buffers
|
||||||
map <F7> :w !xclip<CR><CR>
|
map <F7> :w !xclip<CR><CR>
|
||||||
vmap <F7> "*y
|
vmap <F7> "*y
|
||||||
|
@ -110,3 +111,50 @@ command Z :set undoreload=0|edit
|
||||||
" show/hide special chars with :set (un)list
|
" show/hide special chars with :set (un)list
|
||||||
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
|
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
|
||||||
|
|
||||||
|
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||||
|
augroup WhitespaceMatch
|
||||||
|
" Remove ALL autocommands for the WhitespaceMatch group.
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWinEnter * let w:whitespace_match_number =
|
||||||
|
\ matchadd('ExtraWhitespace', '\s\+$')
|
||||||
|
autocmd InsertEnter * call s:ToggleWhitespaceMatch('i')
|
||||||
|
autocmd InsertLeave * call s:ToggleWhitespaceMatch('n')
|
||||||
|
augroup END
|
||||||
|
function! s:ToggleWhitespaceMatch(mode)
|
||||||
|
let pattern = (a:mode == 'i') ? '\s\+\%#\@<!$' : '\s\+$'
|
||||||
|
if exists('w:whitespace_match_number')
|
||||||
|
call matchdelete(w:whitespace_match_number)
|
||||||
|
call matchadd('ExtraWhitespace', pattern, 10, w:whitespace_match_number)
|
||||||
|
else
|
||||||
|
" Something went wrong, try to be graceful.
|
||||||
|
let w:whitespace_match_number = matchadd('ExtraWhitespace', pattern)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
""" move
|
||||||
|
nnoremap <C-J> <C-W><C-J>
|
||||||
|
nnoremap <C-K> <C-W><C-K>
|
||||||
|
nnoremap <C-L> <C-W><C-L>
|
||||||
|
nnoremap <C-H> <C-W><C-H>
|
||||||
|
""" tell vim where to place new split
|
||||||
|
set splitbelow
|
||||||
|
set splitright
|
||||||
|
|
||||||
|
" spelling mistakes colors
|
||||||
|
hi clear SpellBad
|
||||||
|
hi SpellBad ctermfg=yellow
|
||||||
|
hi SpellBad ctermbg=red
|
||||||
|
|
||||||
|
" tabline color
|
||||||
|
hi TabLineFill ctermfg=DarkGreen ctermbg=DarkGreen
|
||||||
|
hi TabLine ctermfg=Blue ctermbg=Yellow
|
||||||
|
hi TabLineSel ctermfg=Red ctermbg=Yellow
|
||||||
|
|
||||||
|
"
|
||||||
|
command T :tabedit
|
||||||
|
command B :buffers
|
||||||
|
|
||||||
|
" current line number
|
||||||
|
hi cursorline cterm=none ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE
|
||||||
|
hi CursorLineNr cterm=none
|
||||||
|
set cursorline
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
# file 'install.sh', created by motius, on 2017-10-28
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
GITDIR=${HOME}
|
||||||
|
VIMGIT=vim
|
||||||
|
GIT=/usr/bin/git
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# go/rego
|
||||||
|
|
||||||
|
cd "${GITDIR}/.vim/" || exit 42;
|
||||||
|
|
||||||
|
if [ -d "vim" ]
|
||||||
|
then
|
||||||
|
cd ${VIMGIT} || exit 42;
|
||||||
|
${GIT} pull
|
||||||
|
else
|
||||||
|
${GIT} clone https://github.com/vim/vim ${VIMGIT}
|
||||||
|
cd ${VIMGIT} || exit 42;
|
||||||
|
fi
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# clean
|
||||||
|
|
||||||
|
${GIT} clean -fdx
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# compile and install
|
||||||
|
|
||||||
|
./configure --enable-python3interp=yes --prefix="${GITDIR}"/.vim/${VIMGIT}/install
|
||||||
|
make -j
|
||||||
|
make install
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# EOF 'install.sh'
|
||||||
|
################################################################################
|
||||||
|
|
Loading…
Reference in New Issue