Giter VIP home page Giter VIP logo

q-vim's Introduction

q-vim

my vim config. 来自一个前端开发码农的 vim 配置方案。

功能 & Features

  • 广泛支持前端开发,支持htmljavascripttypescriptreact(jsx), scsscss等高亮、关键词补全、语法补全; 也支持其它语言,例如pythonphp
  • 内置了 gruvbox paperColor 等优秀主题
  • Lint 代码检查(由 ALE 提供支持,需要 vim8+)
  • tidy、prettier 等格式化代码
  • minibufferexplore 支持
  • NERDTree 支持,目录树
    • F5 打开 NERDTree 面板,或者刷新基于当前文件刷新目录树
  • UndoTree 支持,文件变动历史
    • F4 打开或者关闭 UndoTree 面板
  • CtrlP.vim 支持,项目全局文件模糊查找
    • <Space>空格键 或 <leader>p 触发查找面板
    • <leader>pr 触发最近访问文件列表面板
    • <leader>pb 触发当前 buffers 列表查找
    • <leader>fu 触发函数名查找
  • Ctrlsf.vim 支持,全局跨文件内容搜索
    • <leader>sf 打开搜索面板
  • YCM 支持,vim 上最好的补全插件
    • 对 css、scss 等做了优化
  • Ultisnips 支持
    • 支持 react-snippets、es6-snippets 等
  • 对 git 支持更好
    • 文件变动左侧标记,状态栏提示等
    • vim-fugitive 支持,可以不离开 vim 进行 git 操作
  • markdown 编辑实时预览
  • js 等格式文件,可以显示对齐缩进线
  • vim-easygrep 带来更快的全局内容查找、替换
  • 快速注释代码
    • <c-c> 添加注释
    • <c-x> 取消注释
  • 快速打开或者关闭 quickfix、loclist 面板
    • F2 打开或者关闭 qucikfix
    • F3 打开或者关闭 loclist
  • easymotion 更快速的文件内跳转
    • f F t T 做了新的映射
    • / ? 搜索做了映射
    • <leader><leader>j <leader><leader>k <leader><leader>h <leader><leader>l 上下左右移动
  • 更快速的移动、交换代码行
    • <leader>j 向下,<leader>k 向上 (由 vim-move 提供)
    • <leader>h 向左,<leader>l 向右(由 vim-sideways 提供)
    • cx cxx 快速交换词组、行、块等(由 vim-exchange 提供)

... 更多其它功能,更详细键位配置请参考 vimrc 文件

安装 & Install

环境
  • mac osx(其它平台没测试,部分功能可能会有问题)
  • vim8+(否则无法使用ale代码检查功能)
  • node6+npm2+ternjstypescripteslinttslintprettier
    brew install node
    npm install -g tern eslint tslint typescript prettier stylelint jsonlint lehre fixjson vim-language-server bash-language-server yaml-language-server vls
  • ag(the silver searcher)
    brew install the_silver_searcher
  • tidy(html lint)
    brew install tidy-html5
  • vint(vim lint)
    python3 -m pip install vim-vint
  • mdl(markdown lint)
    sudo gem install mdl
  • yamllint
    python3 -m pip install yamllint
  • scss-lint
    sudo gem install scss-lint
  • dart
    brew tap dart-lang/dart
    brew install dart
  • 安装 FantasqueSansMono 字体(如果不安装,需要修改第 15 行, 改为 set guifont=monoca
安装
  • 安装好 vim-plug

    curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
        https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  • 将 vimrc 里内容复制到你的 ~/.vimrc 或者 ~/.vim/vimrc

    cp ./q-vim/vimrc ~/.vim/vimrc
  • 执行 :PlugInstall

eslinttslintprettierternjs 等配置均为全局环境配置,请自己按照自己的需求配置。

例如:

  • eslint: ~/.eslintrc
  • ternjs: ~/.tern-project
  • prettier: ~/.prittierrc

截图 & Screenshots

startIfy

coding

q-vim's People

Contributors

qiqiboy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.