Skip to content

Commit d4a98bc

Browse files
committed
Feat: Add my vim profiles
there are several vim scripts for customize my workspace. some settings maybe too personality for others to use it. please take good care of yourself if you are interest about them. if you need anything, just let me know.
1 parent 1d4dcaf commit d4a98bc

33 files changed

+1495
-1
lines changed

README.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,79 @@
11
# flw.vim
2-
My vim profiles.
2+
3+
这是我的 vim 配置文件群。简单安装就可以部署我的工作环境。
4+
5+
各位图省事儿的朋友可以把它当成一个 Vim 的发行版来使用,
6+
在基本系统上一键部署和我一样的开发环境。
7+
8+
当然了,世上也有更好的 Vim 发行版,比如 [SpaceVim](https://spacevim.org)([GitHub](https://github.com/SpaceVim/SpaceVim))。
9+
如果你追求更好的社区支持,显然它比我这个更合适。
10+
11+
## 集成的插件列表
12+
13+
### 开发工具
14+
15+
* 自动完成 [Valloric/YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
16+
* 代码片段补全(引擎) [SirVer/UltiSnips](https://github.com/SirVer/UltiSnips)
17+
* 代码片段补全(模版) [honza/vim-snippets](https://github.com/honza/vim-snippets)
18+
* 语法检查引擎 [vim-syntastic/syntastic](https://github.com/vim-syntastic/syntastic)
19+
* 标识符浏览及定位 [majutsushi/tagbar](https://github.com/majutsushi/tagbar)
20+
21+
### 办公插件
22+
23+
* 用 Markdown 写 Wiki [vimwiki/vimwiki](https://github.com/vimwiki/vimwiki)
24+
* 可以和 VimWiki 集成的日记本 [mattn/calendar-vim](https://github.com/mattn/calendar-vim)
25+
* 打开最近的文件 [yegappan/mru](https://github.com/yegappan/mru)
26+
* 浏览已经打开的文件 [jlanzarotta/BufExplorer](https://github.com/jlanzarotta/BufExplorer)
27+
* 浏览磁盘文件 [mbbill/VimExplorer](https://github.com/mbbill/VimExplorer)
28+
* Markdown 支持 [plasticboy/vim-markdown](https://github.com/plasticboy/vim-markdown)
29+
30+
### 编程语言支持
31+
32+
* JavaScript [pangloss/vim-javascript](https://github.com/pangloss/vim-javascript)
33+
* React/JSX [jsx/jsx.vim](https://github.com/jsx/jsx.vim)
34+
* Less [groenewege/vim-less](https://github.com/groenewege/vim-less)
35+
* CSS [ap/vim-css-color](https://github.com/ap/vim-css-color)
36+
* Go [dgryski/vim-godef](https://github.com/dgryski/vim-godef)
37+
* Go [fatih/vim-go](https://github.com/fatih/vim-go)
38+
* Erlang [vim-erlang/vim-erlang-runtime](https://github.com/vim-erlang/vim-erlang-runtime)
39+
* Red/Rebol [Prosumma/vim-rebol](https://github.com/Prosumma/vim-rebol)
40+
* JavaScript [Shutnik/jshint2.vim](https://github.com/Shutnik/jshint2.vim)
41+
* Rust [racer-rust/vim-racer](https://github.com/racer-rust/vim-racer)
42+
* Rust [rust-lang/rust.vim](https://github.com/rust-lang/rust.vim)
43+
* TOML [cespare/vim-toml](https://github.com/cespare/vim-toml)
44+
* Alda [daveyarwood/vim-alda](https://github.com/daveyarwood/vim-alda)
45+
46+
### Git 支持
47+
48+
* Git 命令 [tpope/vim-fugitive](https://github.com/tpope/vim-fugitive)
49+
* Git commit 浏览器 [junegunn/gv.vim](https://github.com/junegunn/gv.vim)
50+
* 在侧边栏实时显示每行代码的修改状态 [airblade/vim-gitgutter](https://github.com/airblade/vim-gitgutter)
51+
* Git 工作流 [jreybert/vimagit](https://github.com/jreybert/vimagit)
52+
* 一键发布 Gist [mattn/gist-vim](https://github.com/mattn/gist-vim)
53+
54+
### 工具和 Vim 增强
55+
56+
* VimL 写的 Web API 客户端 [mattn/webapi-vim](https://github.com/mattn/webapi-vim)
57+
* 开发者 coding 行为统计 [wakatime/vim-wakatime](https://github.com/wakatime/vim-wakatime)
58+
* 色彩斑斓的 statusline [itchyny/lightline.vim](https://github.com/itchyny/lightline.vim)
59+
* 用 Vim 画 ASCII ART [vim-scripts/DrawIt](https://github.com/vim-scripts/DrawIt)
60+
* 制表工具 [godlygeek/tabular](https://github.com/godlygeek/tabular)
61+
* 修复 Vim 复制粘贴问题 [ConradIrwin/vim-bracketed-paste](https://github.com/ConradIrwin/vim-bracketed-paste)
62+
63+
64+
## 安装方法
65+
66+
```shell
67+
mkdir -p ~/.vim/bundle
68+
cd ~/.vim/bundle
69+
git clone https://github.com/flw-cn/flw.vim.git ~/.vim/bundle/flw.vim
70+
# 安装,安装过程中会生成 .vimrc,请先移走你的 ~/.vimrc
71+
(cd flw.vim; git checkout develop; ./install.sh)
72+
```
73+
74+
## 贡献指南
75+
76+
* 如果你觉得对你有用,请随意 clone 并使用,你可以任意传播本项目,只需要保留文件头部分的许可说明(如果有的话)即可。
77+
* 别忘了 star!
78+
* 有任何好的建议请给我发 issue,如果你可以帮助它变得更好,请发 PR 给我。
79+
* 也许有一天它会变成一个真正的发行版。

autoload/flw/cpp.vim

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
" 快速切换头文件和源代码 -----------------------------{{{
2+
" 非常好用!
3+
function! flw#cpp#SwitchHeaderAndSource()
4+
let basename = expand( "%:r" )
5+
let ext = expand( "%:e" )
6+
7+
let filename = ''
8+
if ( ext == "c" || ext == "cpp" ) && filereadable( basename . ".h" )
9+
let filename = basename . ".h"
10+
elseif ( ext == "c" || ext == "cpp" ) && filereadable( basename . ".hpp" )
11+
let filename = basename . ".hpp"
12+
elseif ( ext == "h" || ext == "hpp" ) && filereadable( basename . ".c" )
13+
let filename = basename . ".c"
14+
elseif ( ext == "h" || ext == "hpp" ) && filereadable( basename . ".cpp" )
15+
let filename = basename . ".cpp"
16+
endif
17+
18+
execute "edit " . filename
19+
endfunction
20+
"}}}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
" =============================================================================
2+
" Filename: autoload/lightline/colorscheme/darkblue.vim
3+
" Author: flw <flw@cpan.org>
4+
" License: MIT License
5+
" Last Change: 2018/05/23 17:52:38.
6+
" =============================================================================
7+
8+
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
9+
let s:p.normal.left = [ ['darkestgreen', 'brightgreen', 'bold'], ['white', 'gray4'] ]
10+
let s:p.normal.right = [ ['gray5', 'gray10'], ['gray9', 'gray4'], ['gray8', 'gray2'] ]
11+
let s:p.inactive.right = [ ['gray1', 'gray5'], ['gray4', 'gray1'], ['gray4', 'gray0'] ]
12+
let s:p.inactive.left = s:p.inactive.right[1:]
13+
let s:p.insert.left = [ ['darkestcyan', 'white', 'bold'], ['white', 'darkblue'] ]
14+
let s:p.insert.right = [ [ 'darkestcyan', 'mediumcyan' ], [ 'mediumcyan', 'darkblue' ], [ 'mediumcyan', 'darkestblue' ] ]
15+
let s:p.replace.left = [ ['white', 'brightred', 'bold'], ['white', 'gray4'] ]
16+
let s:p.visual.left = [ ['darkred', 'brightorange', 'bold'], ['white', 'gray4'] ]
17+
let s:p.normal.middle = [ [ 'gray7', 'gray2' ] ]
18+
let s:p.insert.middle = [ [ 'mediumcyan', 'darkestblue' ] ]
19+
let s:p.replace.middle = s:p.normal.middle
20+
let s:p.replace.right = s:p.normal.right
21+
let s:p.tabline.left = [ [ 'gray9', 'gray4', 7, 4 ] ]
22+
let s:p.tabline.tabsel = [ [ 'gray9', 'gray1', 11, 4 ] ]
23+
let s:p.tabline.middle = [ [ 'gray2', 'gray8', 4, 4 ] ]
24+
let s:p.tabline.right = s:p.tabline.left
25+
let s:p.normal.error = [ [ 'gray9', 'brightestred' ] ]
26+
let s:p.normal.warning = [ [ 'gray1', 'yellow' ] ]
27+
28+
let g:lightline#colorscheme#darkblue#palette = lightline#colorscheme#fill(s:p)

0 commit comments

Comments
 (0)