Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix html plug url 20191024 #1101

Open
wants to merge 16 commits into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" Modeline and Notes {
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=9 foldmethod=marker spell:
"
" __ _ _____ _
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
Expand Down Expand Up @@ -205,7 +205,7 @@
set laststatus=2

" Broken down into easily includeable segments
set statusline=%<%f\ " Filename
set statusline=%<%F\ " Filename,%f->%F
set statusline+=%w%h%m%r " Options
if !exists('g:override_spf13_bundles')
set statusline+=%{fugitive#statusline()} " Git Hotness
Expand All @@ -229,7 +229,8 @@
set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too
set scrolljump=5 " Lines to scroll when cursor leaves screen
set scrolloff=3 " Minimum lines to keep above and below cursor
set foldenable " Auto fold code
"set foldenable " Auto fold code
set nofoldenable " Not Auto fold code
set list
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace

Expand Down Expand Up @@ -370,7 +371,11 @@
if !exists('g:spf13_no_keyfixes')
if has("user_commands")
command! -bang -nargs=* -complete=file E e<bang> <args>
command! -bang -nargs=* -complete=file W w<bang> <args>
"command! -bang -nargs=* -complete=file W w<bang> <args>
"
" Sample command W
"
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
command! -bang -nargs=* -complete=file Wq wq<bang> <args>
command! -bang -nargs=* -complete=file WQ wq<bang> <args>
command! -bang Wa wa<bang>
Expand Down Expand Up @@ -581,7 +586,9 @@
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
" Notice: If let it =1, the tree will auto close after the file
" open
let NERDTreeQuitOnOpen=0
let NERDTreeMouseMode=2
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
Expand Down
5 changes: 3 additions & 2 deletions .vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
" General {
if count(g:spf13_bundle_groups, 'general')
Bundle 'scrooloose/nerdtree'
Bundle 'Xuyuanp/nerdtree-git-plugin'
Bundle 'altercation/vim-colors-solarized'
Bundle 'spf13/vim-colors'
Bundle 'tpope/vim-surround'
Expand All @@ -124,7 +125,7 @@
Bundle 'powerline/fonts'
Bundle 'bling/vim-bufferline'
Bundle 'easymotion/vim-easymotion'
Bundle 'jistr/vim-nerdtree-tabs'
"Bundle 'jistr/vim-nerdtree-tabs'
Bundle 'flazz/vim-colorschemes'
Bundle 'mbbill/undotree'
Bundle 'nathanaelkane/vim-indent-guides'
Expand Down Expand Up @@ -244,7 +245,7 @@

" HTML {
if count(g:spf13_bundle_groups, 'html')
Bundle 'amirh/HTML-AutoCloseTag'
Bundle 'heracek/HTML-AutoCloseTag'
Bundle 'hail2u/vim-css3-syntax'
Bundle 'gorodinskiy/vim-coloresque'
Bundle 'tpope/vim-haml'
Expand Down
41 changes: 41 additions & 0 deletions .vimrc.bundles.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
" Modeline and Notes {
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
"
" __ _ _____ _
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
" / __| '_ \| |_| | |_ \ _____\ \ / /| | '_ ` _ \
" \__ \ |_) | _| |___) |_____|\ V / | | | | | | |
" |___/ .__/|_| |_|____/ \_/ |_|_| |_| |_|
" |_|
"
" This is the personal .vimrc.bundles file of Steve Francia.
" While much of it is beneficial for general use, I would
" recommend picking out the parts you want and understand.
"
" This file imports the various plugins of spf13. If you
" wish to alter which groups are imported, see vimrc.before.
" If you wish to add or remove individual bundles, create
" ~/.vimrc.bundles.local and `Bundle` or `UnBundle` as needed
" from there.
"
" You can find me at http://spf13.com
" }

" Bundle 'file://~/.vim/bundle/cscope_map.vim'
" Bundle 'file://~/.vim/bundle/goyo.vim'
Bundle 'junegunn/goyo.vim'
Bundle 'chazy/cscope_maps'
"Bundle 'file://~/.vim/bundle/bufexplorer'
"Repeat with the vimrc.bundles
"Bundle 'The-NERD-Commenter'

" <leader>k/K is nice
Bundle 'lfv89/vim-interestingwords'
Bundle 'itchyny/vim-cursorword'

" Bundle 'file://~/.vim/bundle/gutentags_plus'
Bundle 'yaoyz-yuneec/gutentags_plus'
Bundle 'ludovicchabant/vim-gutentags'
Bundle 'sainnhe/vim-color-forest-night'
Bundle 'isene/hyperlist.vim'
Bundle 'voldikss/vim-translate-me'
163 changes: 163 additions & 0 deletions .vimrc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
" 关闭NERDTree快捷键
" map <leader>t :NERDTreeToggle<CR>
" 显示行号
let NERDTreeShowLineNumbers=1
let NERDTreeAutoCenter=1
" 是否显示隐藏文件
let NERDTreeShowHidden=1
" 设置宽度
let NERDTreeWinSize=31
" 在终端启动vim时,共享NERDTree
let g:nerdtree_tabs_open_on_console_startup=1
" 忽略一下文件的显示
let NERDTreeIgnore=['\.pyc','\~$','\.swp']
" 显示书签列表
let NERDTreeShowBookmarks=1

let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "?",
\ "Staged" : "?",
\ "Untracked" : "?",
\ "Renamed" : "?",
\ "Unmerged" : "═",
\ "Deleted" : "?",
\ "Dirty" : "?",
\ "Clean" : "??",
\ "Unknown" : "?"
\ }
" Show the line number
set nu
" Enable wrap
set wrap
" Auto open NERDTree when enter vim
" Use vim, not vim ./dir
autocmd vimenter * NERDTree
" NERDTree config
map <silent><F2> :NERDTreeToggle<CR>
imap <F2> <ESC> :NERDTreeToggle<CR>
"Use the pre dir tree
"nmap <F2> :NERDTreeToggle<CR> :NERDTreeMirror<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif


"安装tagbar插件
""设置tagbar使用的ctags的插件,必须要设置对
let g:tagbar_ctags_bin='/usr/bin/ctags'
"设置tagbar的窗口宽度
"let g:tagbar_width=30
""设置tagbar的窗口显示的位置,为左边
let g:tagbar_right=1
"打开文件自动 打开tagbar
"autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen()
let Tlist_Show_One_File=1
let Tlist_OnlyWindow=1
let Tlist_Use_Right_Window=1
let Tlist_Sort_Type='name'
let Tlist_Exit_OnlyWindow=1
let Tlist_Show_Menu=1
let Tlist_Max_Submenu_Items=10
let Tlist_Max_Tag_length=20
let Tlist_Use_SingleClick=0
let Tlist_Auto_Open=0
let Tlist_Close_On_Select=0
let Tlist_File_Fold_Auto_Close=1
let Tlist_GainFocus_On_ToggleOpen=1
let Tlist_Process_File_Always=1
let Tlist_WinHeight=10
let Tlist_WinWidth=30
let Tlist_Use_Horiz_Window=0
map <silent><F3> :TagbarToggle<CR>
imap <F3> <ESC> :TagbarToggle<CR>
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
colorschem murphy
"In normal mode, ; is equal to :
nmap ; :

" Buf explore
nnoremap <silent> <leader>f :CtrlPMRU<CR>

" airline statusline etc.
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'


" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT

" Close all the buffers
map <leader>ba :bufdo bd<cr>

map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>

" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext

" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()

""""""""""""""""""""""""""""""
" => bufExplorer plugin
""""""""""""""""""""""""""""""
" Disalbe the bufExplorer, Because it conflict with many other vim plugs
" When enable it often pop the warning as follow:
" Error detected while processing function <SNR>49_BEActivateBuffer:
" line 18:
" E684: list index out of range: 2
" This will disable the bufExplorer
let g:bufexplorer_version = "disabled"
let g:bufExplorerDefaultHelp=0
let g:bufExplorerShowRelativePath=1
let g:bufExplorerFindActive=1
let g:bufExplorerSortBy='name'
"map <leader>o :BufExplorer<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vimroom
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:goyo_width=100
let g:goyo_margin_top = 2
let g:goyo_margin_bottom = 2
nnoremap <silent> <leader>z :Goyo<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Global copy/paste
" Use the global clipbord by install vim-gnome
" See: https://www.cnblogs.com/songlen/p/6883522.html
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set clipboard=unnamedplus

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => cscope quickfix
"See:
" https://stackoverflow.com/questions/28185067/vim-go-to-next-search-result-across-multiple-files
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Replaced by the gutentags_plus plug@2019-08-02
" set cscopequickfix=s-,c-,d-,i-,t-,e-

" view the list of matches with:
" :cw[indow] Open the quickfix window
map <silent><F5> :cw<CR>
imap <F5> <ESC> :cw<CR>
" :ccl[ose] Close the quickfix window
nmap <S-c> :ccl<cr>
map <silent><F4> :ccl<CR>
imap <F4> <ESC> :ccl<CR>
" :[count]cn[ext][!]
nmap <S-z> :cn<cr>
" :[count]cp[revious][!]
nmap <S-x> :cp<cr>

" Use the new colorscheme plug
colorscheme forest-night
let g:airline_theme = 'forest_night'



25 changes: 25 additions & 0 deletions README2.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Some trip

# Vim
## Upgrade to 8.0
The vim 8.0 has better support for the spf13 project.
The installation steps are as follows:

sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim



## Uninstall Vim 8.0:
To uninstall Vim 8.0 and downgrade it to the stock version in Ubuntu repository, run the command below to purge the PPA:

sudo apt install ppa-purge && sudo ppa-purge ppa:jonathonf/vim


## +lua(vim --version)

sudo apt install vim-gtk/nox

It may improve the autocomplete feature.

Binary file added bak_TO_DEL/gutentags_plus.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ do_backup() {
if [ -e "$1" ] || [ -e "$2" ] || [ -e "$3" ]; then
msg "Attempting to back up your original vim configuration."
today=`date +%Y%m%d_%s`
# remove the current vim config and backup
for i in "$1" "$2" "$3"; do
[ -e "$i" ] && [ ! -L "$i" ] && mv -v "$i" "$i.$today";
done
Expand Down Expand Up @@ -124,14 +125,16 @@ create_symlinks() {
lnif "$source_path/.vimrc" "$target_path/.vimrc"
lnif "$source_path/.vimrc.bundles" "$target_path/.vimrc.bundles"
lnif "$source_path/.vimrc.before" "$target_path/.vimrc.before"
lnif "$source_path/.vimrc.local" "$target_path/.vimrc.local"
lnif "$source_path/.vim" "$target_path/.vim"

if program_exists "nvim"; then
lnif "$source_path/.vim" "$target_path/.config/nvim"
lnif "$source_path/.vimrc" "$target_path/.config/nvim/init.vim"
fi

touch "$target_path/.vimrc.local"
# Use the file in the spf13-vim-3 project, not create the file in the ~ dir
#touch "$target_path/.vimrc.local"

ret="$?"
success "Setting up vim symlinks."
Expand Down