Giter Site home page Giter Site logo

debajyati / perfect-vimrc Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 105 KB

A highly customized vim/neovim configuration in vimscript

Home Page: https://debajyati.github.io/perfect-vimrc/

License: MIT License

Vim Script 100.00%
coc-nvim codeium lsp neovim-configuration neovim-setup nvim nvim-config vim vim-configuration vimrc

perfect-vimrc's Introduction

perfect-vimrc

My vim/nvim config entirely in vimscript with Conqueror of Completion, to setup environment for different programming languages

Prerequisites:

  • Make sure you already have a backup of your previous vim-config (if any). In case you have already a vim-config and you don't want to lose it, you can make a backup file using the command below before creating the new .vimrc -
      mv .vimrc .vimrc.bak

Also Make sure you run the command in the directory where your already existing .vimrc is located. The command will rename it with a .bak file-extension which stands for backup. Now this backup file can be stored/located wherever wanted.

  • install vim-plug, nodejs, yarn, & build-essentials.

Note:

This config can also be used for NeoVim if wanted. Just replace the directory ~/.vim/plugged with .local/share/nvim/plugged in the first line of the section of the config shown below, before performing the 2nd step of Instructions -

call plug#begin('~/.vim/plugged')
" Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline'
" Plug coc.nvim for C/C++ lsp
Plug 'neoclide/coc.nvim'
Plug 'jiangmiao/auto-pairs'
Plug 'vim-airline/vim-airline-themes'
Plug 'gruvbox-community/gruvbox'
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
Plug 'sonph/onehalf', { 'rtp': 'vim' }
Plug 'preservim/nerdtree'
Plug 'christoomey/vim-tmux-navigator'
Plug 'ryanoasis/vim-devicons'
" Plug 'Exafunction/codeium.vim', { 'branch': 'main' }
Plug 'prasada7/toggleterm.vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
call plug#end()

Actual Work

  1. Copy the whole text of the config.vim file in this repo and paste it in your own blank .vimrc file. Save it.
  2. Next Run the command :PlugInstall inside vim (According to the config, I'm using Vim-Plug plugin manager. If you use any other plugin manager like vundle or packer, you are free to change the config file wherever needed and then run the plugin manager's install command). You may need to run the command after restarting vim. You may also need to run :PLugClean to remove all the previously installed plugins.
  3. After all plugins are installed run the :PlugUpdate command inside vim to update the already installed plugins.
  4. Before to be able to use coc.nvim you will need to run npm ci in the directory ~/.vim/plugged/coc.nvim (if you are using vim) or ~/.local/share/nvim/plugged/coc.nvim (if you are using neovim) to activate it.
  5. Now run :CocInstall coc-clangd inside vim to install the required lsp for C and C++, :CocInstall coc-pyright to install the required lsp for python. :CocInstall coc-tsserver coc-json coc-eslint is recommended javascript/typescript + json lsp support. You can find the required lsp for the programming language that you use on this page of coc.nvim repo.
  6. Now navigate to your project directory, and check if the setup is working properly.
  7. (Optional): Uncomment the line Plug 'Exafunction/codeium.vim', { 'branch': 'main' } in the config file and run :PlugInstall to install the Codeium AI plugin in vim. After installation refer to the Official Codeium AI installation and usage guide .
  8. Enjoy!

Additional (How to use it) + Some Keybindings:

  1. , is the leader key in this configuration.
  2. Use ,+n to open and close the file explorer.
  3. Use the arrow keys to move down through the list of code suggesions and use Enter key to manually trigger completion. You can also click Tab to trigger completion by going down through the list of code suggesions & click Shift+Tab to trigger completion by going up through the list of code suggessions.
  4. Click Ctrl+\ to toggle terminal. Now you can navigate to the file buffer from terminal and vice versa using the native window navigation keymaps of vim or your beloved mouse, whatever you want. Use Ctrl+d to kill the terminal.
  5. Run :Colors to change colorscheme
  6. Click <space>ff to quickly navigate to a file inside the CWD, with fuzzy search(fzf) (Optional: for file preview- install bat. for debian/ubuntu - sudo apt install bat. For windows - scoop install bat).
  7. Click <space>b to quickly navigate to an existing buffer inside the CWD.

Contributing

Any kind of suggesion, contributions(bug fixes, enhancements) are cordially welcomed.

perfect-vimrc's People

Contributors

debajyati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

keshavashiya

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.