Coder Social home page Coder Social logo

myvim's Introduction

MyVim

set vim and vim configure

环境

g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
cmake version 3.16.3
Python 3.8.5
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)

Just For Linux

1. 建立文件

在用户目录下新建文件夹.vim,然后再.vim中建立vim配置文件vimrc

2. 下载插件管理器

使用vim-plug来管理vim插件。

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

执行以下命令进行安装

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

基本示例

call plug#begin()
Plug 'tpope/vim-sensible'
call plug#end()

安装插件

Normal模式下输入: PlugInstall即可

3. 常用插件

对于C/C++的代码提示及跳转采用YCM插件。

前置安装命令

sudo apt install build-essential cmake vim-nox python3-dev

C/C++所需Clang

sudo python3 install.py --clangd-completer

编译YCM插件

cd ~/.vim/plugged/YouCompleteMe
sudo python3 ./install.py

将系统头文件包含到文件.ycm_extra_conf.py

文件内容不同版本系统需要注意更换版本号(此处为9),因为g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

cd ~/.vim
vim .ycm_extra_conf.py

以上vimrc.ycm_extra_conf.py文件内容可以直接下载使用。

myvim's People

Contributors

doubleq0726 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.