{"id":21863099,"url":"https://github.com/shfshanyue/vim-config","last_synced_at":"2025-04-14T19:43:45.290Z","repository":{"id":46989591,"uuid":"86083407","full_name":"shfshanyue/vim-config","owner":"shfshanyue","description":"Vim for FE","archived":false,"fork":false,"pushed_at":"2022-07-22T23:06:54.000Z","size":413,"stargazers_count":55,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T08:04:35.124Z","etag":null,"topics":["vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shfshanyue.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-24T15:32:59.000Z","updated_at":"2023-09-25T01:54:43.000Z","dependencies_parsed_at":"2022-09-10T22:30:24.268Z","dependency_job_id":null,"html_url":"https://github.com/shfshanyue/vim-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fvim-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fvim-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fvim-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fvim-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shfshanyue","download_url":"https://codeload.github.com/shfshanyue/vim-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248949634,"owners_count":21188115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vim"],"created_at":"2024-11-28T03:20:02.143Z","updated_at":"2025-04-14T19:43:45.269Z","avatar_url":"https://github.com/shfshanyue.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vim config for shanyue\n\n配置使用 `pathogen` 和 `git submodules` 进行插件管理，使用本配置文件可以使您快速上手vim。本配置文件对于前端友好，前端开发者可以使用 `emmet` 可以快速编写html和css，另外有 `jsx` 与 `pug`语法高亮，并且可以使用 `eslint` 进行语法检查。本人早期使用 [amix/vimrc](https://github.com/amix/vimrc) 进行开发，深入浅出，帮助很大，非常推荐。\n\n欢迎 star！欢迎 pr！\n\n## 配置\n\n```\n$ git clone git@github.com:shfshanyue/vim-config.git ~/.vim-config --recursive\n$ cd ~/.vim-config\n$ ln -s $(pwd)/.vimrc ~/.vimrc\n\n$ git submodule update --remote\n```\n\n## 常用快捷键\n\n+ `,w` 快速保存\n+ `:W` 保存需要权限的文件\n+ `gg` 快速移动到文件首\n+ `G` 快速移动至文件尾\n+ `dd` 剪切本行\n+ `yy` 复制本行\n+ `:12` 快速移动至特定行\n+ `\u003cc-o\u003e` 移动至最近一次位置\n+ `==i{` 自动缩进\n+ `\u003cc-p\u003e` 自动补全\n+ `\u003cc-w-w\u003e` 切换至最近一次窗口\n+ `\"*yy` 复制到系统剪切板\n+ `*` 快速查找关键字，类似于sublime的 `Command + d`\n+ `:noh` 取消关键字高亮\n+ `:set nu` 显示行号\n+ `:options` 显示配置\n\n## 截屏\n+ markdown 文件高亮与缩进\n\n![vim-1](https://raw.githubusercontent.com/shfshanyue/vim-config/master/screenshots/vim-1.png)\n\n+ solarized dark 模式\n\n![vim-4](https://raw.githubusercontent.com/shfshanyue/vim-config/master/screenshots/vim-4.png)\n\n+ [Goyo](https://github.com/junegunn/goyo.vim) 模式\n\n![vim-2](https://raw.githubusercontent.com/shfshanyue/vim-config/master/screenshots/vim-2.png)\n\n+ [ctrlp](https://github.com/kien/ctrlp.vim) 与 [nerdtree](https://github.com/scrooloose/nerdtree)\n\n![vim-3](https://raw.githubusercontent.com/shfshanyue/vim-config/master/screenshots/vim-3.png)\n\n+ git blame 效果图，插件 [vim-fugitive](https://github.com/tpope/vim-fugitive)\n\n![vi-5](https://raw.githubusercontent.com/shfshanyue/vim-config/master/screenshots/vim-5.png)\n\n## 插件\n\n### [nerdtree](https://github.com/scrooloose/nerdtree)\n\u003e 文件管理器\n\n+ `,nn` 切换文件管理器窗口，类似于sublime的 `Command + k + b`\n+ `,nf` 定位当前文件的位置\n\n在文件管理窗口\n\n+ `ma` 新建文件或文件夹\n+ `md` 删除文件或文件夹\n+ `I` 切换隐藏文件显示状态\n\n### [ctrlp.vim](https://github.com/kien/ctrlp.vim)\n\u003e ctrlp，类似于sublime的ctrlp\n\n+ `\u003cc-p\u003e` 在当前项目下查找文件\n+ `,b` 在buffer中查找文件\n+ `,f` 在最近打开文件中查找\n\n在ctrlp窗口中，`\u003cc-j\u003e` 和 `\u003cc-k\u003e` 控制上下移动。\n\n### [ag.vim](https://github.com/rking/ag.vim)\n\u003e 查找关键字，类似于sublime的 `Command + Shift + f`\n\n+ `Ag key *.js` 在特定文件下查找关键字\n\n注：首先需要安装 [the_silver_searcher](https://github.com/ggreer/the_silver_searcher)\n\n### [vim-commentary](https://github.com/tpope/vim-commentary)\n\u003e 注释命令\n\n+ `:gcc` 注释当前行，类似于sublime的 `\u003cc-/\u003e`\n\n### [vim-fugitive](https://github.com/tpope/vim-fugitive)\n\u003e git扩展\n\n+ `:Gblame` 查看当前行的归属\n+ `:Gdiff` 查看与工作区文件的差异\n+ `:Gread` 相当于 `git checkout -- file`\n+ `:Gwrite` 相当于 `git add file`\n\n### [syntastic](https://github.com/vim-syntastic/syntastic)\n\u003e 语法检查插件，设置eslint\n\n+ `:SyntasticCheck` 语法检查，默认会在保存时进行语法检查，不过会有卡顿\n+ `:lne[xt]` 下一处语法错误\n+ `:lp[revious]` 上一处语法错误\n+ `:! eslint %:p --fix` 自动修正错误\n\n### [emmet-vim](https://github.com/mattn/emmet-vim)\n\u003e emmet扩展\n\n+ `\u003cc-y\u003e,` 类似于sublime的 `\u003cc-e\u003e`\n\n### [delimitMate](https://github.com/Raimondi/delimitMate)\n\u003e 括号，引号自动补全\n\n### [goyo](https://github.com/junegunn/goyo.vim)\n\n+ `:Goyo` 切换至 gotyo 模式\n\n### [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized)\n\u003e solarized 主题\n\n可更改配置文件中 background 为 `dark` 和 `light` 切换主题\n\n## 参考\n\n+ [amix/vimrc](https://github.com/amix/vimrc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshfshanyue%2Fvim-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshfshanyue%2Fvim-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshfshanyue%2Fvim-config/lists"}