Basic configuration file for Vim on Linux OS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.8 KiB

2 years ago
  1. # Readme
  2. This repository includes the basic configuration file for VIM.
  3. # Install Vim Plugin manager
  4. First we need to install the Vim plugin manager to easily add and remove packages into vim editor. Thus, let us add the `plugin.vim`:
  5. ```
  6. curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
  7. https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  8. ```
  9. ## Usage
  10. Add a vim-plug section to your `~/.vimrc` file:
  11. 1. Begin the section with call plug#begin([PLUGIN_DIR])
  12. 2. List the plugins with `Plug` commands
  13. 3. call `plug#end()` to update `&runtimepath` and initialize plugin system
  14. * Automatically executes `filetype plugin indent on and syntax enable`. You can revert the settings after the call. e.g. `filetype indent off`, `syntax off`, etc.
  15. ## Example
  16. ```
  17. call plug#begin()
  18. " The default plugin directory will be as follows:
  19. " - Vim (Linux/macOS): '~/.vim/plugged'
  20. " - Vim (Windows): '~/vimfiles/plugged'
  21. " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
  22. " You can specify a custom plugin directory by passing it as the argument
  23. " - e.g. `call plug#begin('~/.vim/plugged')`
  24. " - Avoid using standard Vim directory names like 'plugin'
  25. " Make sure you use single quotes
  26. " Any valid git URL is allowed
  27. Plug 'https://github.com/junegunn/vim-github-dashboard.git'
  28. " On-demand loading
  29. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  30. " Initialize plugin system
  31. call plug#end()
  32. ```
  33. For a better understanding on how to use the Vim Plugin manager visit the [git webpage](https://github.com/junegunn/vim-plug).
  34. # The `.vimrc` file
  35. Next you will see the contents of the `vimrc` file in this repository:
  36. ```
  37. ```
  38. after copy and paste, or added the require code call the plug installer by entering on command mode in Vim (pressing `Esc` key), then, call `:PlugInstall` to update and install the new Plugins.