All Projects → bilibili → Vim Vide

bilibili / Vim Vide

Licence: apache-2.0
Lightest vimrc, while strong enough. 最轻的vim配置,却足够强!

Programming Languages

python
139335 projects - #7 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to Vim Vide

Vim Crystalline
Functions for taking the monotony out of building your own fancy statusline in Vim
Stars: ✭ 264 (-59.32%)
Mutual labels:  powerline, plugin, statusline
LunarVim
An IDE layer for Neovim with sane defaults. Completely free and community driven.
Stars: ✭ 9,296 (+1332.36%)
Mutual labels:  vimrc, ide
nvim
Structure, documented, super fast neovim configuration. 可能是翻斗花园最好用的 neovim 配置[^1]。
Stars: ✭ 223 (-65.64%)
Mutual labels:  vimrc, ide
barow
A minimalist statusline for n/vim
Stars: ✭ 31 (-95.22%)
Mutual labels:  powerline, statusline
Nerd Fonts
Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
Stars: ✭ 31,778 (+4796.46%)
Mutual labels:  powerline, statusline
Powerline Extra Symbols
▶️ Extra glyphs for your powerline separators
Stars: ✭ 778 (+19.88%)
Mutual labels:  powerline, statusline
dotfiles
🍀 Vim/Neovim + Tmux + Zsh + Alacritty = Build your own fantastic development environment
Stars: ✭ 65 (-89.98%)
Mutual labels:  vimrc, ide
Nord Jetbrains
An arctic, north-bluish clean and elegant JetBrains IDE UI and editor color theme.
Stars: ✭ 293 (-54.85%)
Mutual labels:  ide, plugin
Spacevim
A community-driven modular vim/neovim distribution - The ultimate vimrc
Stars: ✭ 17,558 (+2605.39%)
Mutual labels:  ide, vimrc
Flow Netbeans Markdown
Markdown file support for the NetBeans IDE
Stars: ✭ 276 (-57.47%)
Mutual labels:  ide, plugin
Nvcode
An IDE layer for Neovim with sane defaults. Completely free and community driven.
Stars: ✭ 6,714 (+934.51%)
Mutual labels:  ide, vimrc
Hyper Statusline
Status Line Plugin for Hyper
Stars: ✭ 366 (-43.61%)
Mutual labels:  plugin, statusline
Saros
Open Source IDE plugin for distributed collaborative software development
Stars: ✭ 140 (-78.43%)
Mutual labels:  ide, plugin
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+1901.39%)
Mutual labels:  powerline, statusline
Vim.cpp
🍀 Building vim editor in Linux into an effective C/C++ programming IDE, YouCompleteMe supported
Stars: ✭ 140 (-78.43%)
Mutual labels:  ide, vimrc
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-80.43%)
Mutual labels:  ide, plugin
Vim Lastplace
Intelligently reopen files at your last edit position in Vim.
Stars: ✭ 271 (-58.24%)
Mutual labels:  plugin, vimrc
Pureline
A Pure Bash Powerline PS1 Command Prompt
Stars: ✭ 342 (-47.3%)
Mutual labels:  powerline, statusline
Vim Devicons
Adds file type icons to Vim plugins such as: NERDTree, vim-airline, CtrlP, unite, Denite, lightline, vim-startify and many more
Stars: ✭ 4,473 (+589.21%)
Mutual labels:  powerline, statusline
Gitalk
Gitalk is a modern comment component based on Github Issue and Preact.
Stars: ✭ 5,778 (+790.29%)
Mutual labels:  plugin

screenshots

目录

点击展开目录菜单

交流群

QQ交流群

群号:1019096841 扫码进群: QQ Group QR Code

Install (安装)

如果您之前有定制自己的Vim配置,请先备份~/.vim目录,以下操作会覆盖~/.vim目录

wget http://upos-sz-staticks3.bilivideo.com/appstaticboss/vim-vide-20200812.tgz && tar xvf ./vim-vide-20200812.tgz -C ~

Uninstall (卸载)

如需恢复您原来的自定义配置,执行以下命令后,再将您原来的.vim目录还原至根目录即可

rm -rf ~/.vim
rm -rf ~/.vimtmp

Upgrade Plugins (升级插件)

vim +PlugClean[!] +PlugUpdate +qa

Features (特色功能)

vim-plug

Base on vim-plug, A minimalist Vim plugin manager. 新一代的Vim配置管理组件,体积最小,plugit用了并行下载,速度较顺序下载的vundle快很多!!!

https://github.com/junegunn/vim-plug

Statusline (状态栏)

Origin Vim config statusline, much faster than airline or powerline! (Vim原生配置实现的状态栏,信息很全,比airline或者powerline快数倍!!!)

(Vide)  README.md[+] /home/tjx/vide [unix:utf-8:MARKDOWN]       18,5      50%
+----+  +----------+ +------------+ +-------------------+       +--+      +-+
1       2         3                 4                           5         6
  1. Logo
  2. Relative path (相对路径)
  3. Absolute path of directory (绝对路径)
  4. Format : file-encoding : filetype (文件类型)
  5. Row-position, col position (行号,列号)
  6. Percent of rows (当前行在总行数中的百分比)

Backup (备份路径)

  • 撤销文件夹 ~/.vimtmp/undodir
  • 备份文件夹 ~/.vimtmp/backupdir
  • 交换文件夹 ~/.vimtmp/directory .swp files

Template (模板)

  • call system('bash ~/.vim/lua.template > /tmp/lua.template')
  • call system('bash ~/.vim/php.template > /tmp/php.template')

什么是Vim,为什么要使用Vim

历史

ed -> ex(sed) -> Vi -> Vim -> gVim / macvim

帮助文档

  • vimtutor

    命令行直接运行,非Vim编辑器内命令

  • :h

    Vim内部命令

Vim的五种模式

  1. 插入模式(和普通编辑器的模式差不多)

  2. 普通模式

  3. 可视模式

  4. 命令行模式(扩展Vim的功能,Vim的精髓所在)

  5. 选择模式(不常用)

Vim的哲学

执行次数 + 操作 + 范围
次数 1,2,3
操作 v d c
范围 a i w p $ " ' { ( [ t

 ni hao tang jun xin
 $('nihao')
 <a href="xx" >kjkjk </a>

Vim基本操作

打开/切换文件

命令 功能
:e file_name:o file_name 打开文件
:args file_name 如果使用vim file1 file2 [filen]命令打开多个文件,就可以使用:args file_name命令在打开的文件之间切换
:buffers:lsfiles 查看缓冲区中的文件列表
:bnext 切换到下一个缓冲区文件
:bpreviousbpre 切换到上一个缓冲区文件
:bfirst 切换到第一个缓冲区文件
:blast 切换到最后一个缓冲区文件
:bdelete file_name 删除缓冲区文件
:badd file_name 添加文件到缓冲区

退出/保存

命令 功能
:w 保存
:w! 强制保存,不退出Vim
:q 退出
:q! 强制退出不保存
:wqZZ 保存并退出
:wq! 强制保存,并退出
:w file 将修改另存到file中,不退出Vim
:e! 放弃所有修改,从上次保存文件开始再编辑命令历史

编辑

命令 功能
i/I 编辑
esc 退出编辑模式
u 撤销操作
<Ctrl> + r 重做(恢复被撤销的动作)
ccCS 清空当前行并进入编辑模式
s 删除当前字符并进入编辑模式
r 替换当前字符(替换后不进入编辑模式)
R 持续替换字符(不进入编辑模式),替换一个光标自动移到下一个
=- 格式化当前行代码
gg=G 格式化所有代码
<Shift> + v 可视化多选
:set mouse=a 设置鼠标可区域选择,跟普通的编辑器一样可以进行拖选

删除

命令 功能
dd 删除当前行
ndd 删除包含当前行的n行数据(从当前行往下删除)
dG 删除包含当前行及之后的全部行

移动

命令 功能
gg 跳转到首行
G 跳转到尾行
:nnG 跳转到第n行
o 在下一行插入
O 在上一行插入
wW 移动到下一个单词开头
bB 移动到上一个单词开头
eE 移动到下一个单词结尾
{ 下一段落
} 上一段落
M 跳转到文件内容的中部
H 跳转到文件内容的顶部
L 跳转到文件内容的底部

复制/粘贴

命令 功能
y 复制
p 粘贴到下部
P 粘贴到上部
xX 剪切

搜索

命令 功能
f / F 当前行搜索,til,正向 / 反向
t / T 当前行搜索,until,正向 / 反向
;, 重复当前行搜索
/? 当前文件搜索,向上搜索 / 向下搜索
:grep -r / :!grep -r 跨文件搜索
n 下一个匹配内容
N 上一个匹配内容
ctrl-L 清除搜索高亮

Vim进阶

代码补全

命令 代码
<Ctrl> + p 往前搜索补全
<Ctrl> + n 往后搜索补全
<Ctrl> + e 取消补全
<Ctrl> + y 确定补全

拖动功能

命令 功能
zz 将当前行定位到屏幕中间
zb 将当前行定位到屏幕底部
zt 将当前行定位到屏幕顶部

设置编码和格式

命令 功能
:set fileformat unix dos mas 让换行符自由切换
:set fileencodings 检测打开文档编码的顺序,一般设置为utf-8、cp936
:set fileencoding 保存文档的编码,一般为utf-8
:set encoding Vim本身界面的编码,一般和文档无关
\3 NERDTree-Find
\a :set filetype=awk
\c :set filetype=css
\h :set filetype=html
\j :set filetype=javascript
\l :set filetype=lua
\m :set filetype=markdown
\p :set filetype=php
\s :set filetype=sh
\v :set filetype=vim
\y :set filetype=python

代码折叠

命令 功能
zf 创建折叠
zo 打开折叠
zc 关闭折叠
:mkview / :loadview 保存,载入绘画

分割窗口

命令 功能
:split [file_name]:sp [file_name] 水平分割
:vsplit [file_name]:vs [file_name] 垂直分割
<Ctrl> + w + h 将焦点移动到左边窗口
<Ctrl> + w + j 将焦点移动到下方窗口
<Ctrl> + w + k 将焦点移动到上方窗口
<Ctrl> + w + l 将焦点移动到右边窗口

命令 功能
qa 录制到a
@a 播放a

Vim插件

必装插件

名称 功能
vim-phpmanual php文档,<s-k>查询
syntastic 语法检查
ctrlp.vim 文件跳转
nerdtree 浏览文件
vim-gitgutter 观察git状态
vim-commentary 强大的注释插件

NERDTree操作命令

命令 功能
o 打开/关闭文件或目录
t 在新标签页中打开
T 在后台标签页打开
! 执行此文件
p 到上层目录
P 到根目录
K 到第一个节点
J 到最后一个节点
u 打开上层目录
m 显示文件系统菜单(添加、删除、移动操作)
? 帮助,再按一下关闭
q 关闭
\3 NERDTree-Find

vim-commentary操作命令

快捷键 功能
gcc 注释当前行(普通模式下)
gc 注释当前选中内容(可视多选模式下)
gcap 注释当前所在段落
gcu 注释上一次注释的部分
gcgc 取消一组相邻的注释

资源

Vim资源

其他

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].