Giter VIP home page Giter VIP logo

vim_settings's Introduction

vim_settings

This project can setup vim.

Requirements

The plugin coc.nvim need the requirements:

  • vim: >= 9.0.0438 (run :version in vim or vim --version to check the version)
  • node: >= 12.12

If the version of your vim is older, you can use bellow commands to upgrade vim:

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

Setup

You can follow these steps to use this project to setup vim configuration.

  1. Run the shell script setup.sh to setup the configuration for vim.
    sh setup.sh

Usage

Shortcuts

My shortcuts are defined:

Key Function
<F2> Open or close file explorer
<F3> Open or close tagbar
Ctrl + <F7> Open a new tab to show git commit history
<F7> Split a buffer to show git commit history
<F5> Use the command make to build C/C++ code for debug
Ctrl + <F5> Use the command make to build C/C++ code for release
<F8> Use the command :Dox in the plugin DoxygenToolkit.vim to insert comments for functions or class in C/C++.
<F9> Show the document of the functions or classes
<F10> Open or close quickfix window for the plugin asyncrun
<Leader> + ff Use the command :CtrlPFunky to fuzzy search function names in the current edited cod file.
<Leader> + ci Complete for coc settings file coc-settings.json.
Ctrl + p Use the command :CtrlP to fuzzy search files.
<Leader> + gd Go to function definition.
<Leader> + gt Go to variable type definition.
<Leader> + gi Go to the implementation for variable or function.
<Leader> + gr Go to referecnes for variable or function.
<Leader> + rn Rename the symbol (fucntion or variable).
<Leader> + ti Call the command :TemplateAutoInit to load a template file to write the current file.
<Leader> + mp Call the command :MarkdownPreview to open a web browser to preview markdown file.

Coc.nvim Setting

If you hope the plugin coc.nvim to support your C/C++ library or other libraries, you can use the command :CocConfig in vim to edit the configuration file. And then the plugin coc.nvim will use the configuration file to show hint for any functions, variables etc.

For example, a C library myLib is installed into the directory /opt. The content of the library myLib is:

myLib/
|----- includes/
|----- lib/

where the directory includes has all head files; the directory lib has all library files. You can edit the configuration file to make the plugin coc.nvim finding the include path for the library myLib.

Here is a example for the library myLib:

{
	"clangd.fallbackFlags": [
		"-I/opt/myLib/include"
	]
}

Commands:

This table is shown useful commands:

Commands Function
:CocConfig Open the configuration file to edit for the plugin coc.nvim.
:DoxLic Instert the doxygen-style comments for license at the location of the current edited code file.
:DocAuthor Insert the doxygen-style comments for the author infomation at the location of the current edited code file.
:DoxBlock Instert the doxygen-style comments for a group comments at the location of the current edited code file.

vim_settings's People

Contributors

burstknight avatar

Stargazers

 avatar

Watchers

 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.