Skip to content

TobyGao/vim_setting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

vim_setting

This repository contains my personal Vim configuration and setup scripts.

With this configuration, Vim provides the following features:

  1. Highlights the current cursor line for better focus.
  2. Displays a highlighted line number for the current line.
  3. Stores up to 100 command history entries.
  4. Displays tabs and whitespace with visible symbols.
  5. Automatically completes symbols such as:
    • ()
    • {}
    • []
    • ""
    • ''
  6. Converts tabs into 4 spaces.
  7. Installs and manages Vim plugins using Vundle.

Installed Vim Plugins

  1. NERDTree

    • File explorer for Vim
    • Press Ctrl + f to toggle it
  2. YouCompleteMe

    • Intelligent auto-completion engine for Vim

Installation

1. Run the install script

./install.sh

2. Install Vim plugins

Open Vim and execute:

:PluginInstall

Wait until all plugins are installed.


3. Build YouCompleteMe

Move to the plugin directory:

cd ~/.vim/bundle/YouCompleteMe

4. Compile YouCompleteMe

Recommended (C/C++ support with clangd)

python3 install.py --clangd-completer

Install all completers

python3 install.py --all

This installs support for multiple languages including:

  • C/C++
  • Python
  • Go
  • Rust
  • JavaScript
  • TypeScript

Useful Vim Commands

Insert Mode

Auto-completion

Ctrl + n

Trigger Vim auto-completion suggestions.


Command Mode

Cut lines

#dd

Cut # lines starting from the current cursor line.

Example:

5dd

Cuts 5 lines.


Copy lines

#yy

Copy # lines starting from the current cursor line.

Example:

3yy

Copies 3 lines.


Paste text

p

Paste copied or cut text after the cursor.


Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors