Code Monkey home page Code Monkey logo

vim_config's Introduction

My Awesome Vim / NeoVim Configuration

License: MIT

Vim Logo Neovim Logo

Vim / NeoVim is a powerful and highly configurable text editor designed to make text manipulation and coding a breeze. It's known for its unique modal editing system, where different modes offer distinct functionalities like insertion, navigation, and text manipulation. This design philosophy enables lightning-fast editing once you're familiar with the concepts.

What do we have here? My Vim configuration file!

Who can use it? Anyone can use it!

vim_conf

Requirements ๐Ÿ› ๏ธ

Before using this Vim configuration, make sure you have the following installed on your system:

One of:

And:

  • Node.js ๐ŸŸข (Auto-Completion using nvim.coc)
  • Vim-Plug โšก๏ธ (plugin manager)

What if i want a fast, plug and play setup? visit: https://github.com/YanivZalach/Vim_Config_NO_PLUGINS

Installation ๐Ÿ“ฆ

  1. Install the programs listed above using your package manager or download them from their respective websites.

  2. Copy the config file:

    Linux & MacOS:

    Copy and paste the following command into the terminal and press 'enter':

    For Vim:

    git clone https://github.com/YanivZalach/Vim_Config.git ~/.Vim_Config
    echo "source ~/.Vim_Config/.vimrc" > ~/.vimrc

    For NeoVim:

    git clone https://github.com/YanivZalach/Vim_Config.git ~/.config/nvim_git
    echo "source ~/.config/nvim_git/init.vim" > ~/.config/nvim/init.vim

    Windows:

    Copy and paste the following command into PowerShell and press 'enter':

    For Vim:

    git clone https://github.com/YanivZalach/Vim_Config.git $HOME\.Vim_Config
    mv $HOME\.Vim_Config* $HOME

    For NeoVim:

    git clone https://github.com/YanivZalach/Vim_Config.git  $HOME\AppData\Local\nvim
    mv $HOME\AppData\Local\nvim\.vimrc $HOME\AppData\Local\nvim\init.vim
  3. Install the Plugins:

    To install the plugins, follow these steps:

    Launch Vim/NeoVim by typing the following in the terminal/PowerShell (use vim for Vim or nvim for NeoVim), all in lowercase:

    vim
    

    Once inside Vim/NeoVim, press : to enter command mode.

    Write the following command to trigger plugin installation:

    PlugInstall
    

    After running this command, a window will pop up showing the progress of plugin downloads. Wait for the downloads to complete.

    Once the download is finished, you can exit the window by typing:

    :q
    

    With these steps, you'll have successfully installed the plugins for your Vim/NeoVim configuration.

Usage, Features, and Special Key Bindings ๐Ÿš€

Welcome to Your Enhanced Vim Experience!

Mini-Harpoon ๐Ÿ”Œ

  • Experience seamless navigation using the mini-Harpoon plugin. Mini-Harpoon helps you jump fast between files! (My own plugin).

Smart Tab and Indentation Settings ๐Ÿ’ก

  • Experience seamless and intelligent code indentation for a consistent coding journey.

Beautiful Color Scheme ๐ŸŒˆ

  • A soothing color scheme that's easy on your eyes is set as default, enhancing your focus and readability.

Auto-Completion using coc.nvim ๐Ÿ”Œ

  • Auto-completion courtesy of coc.nvim, which can be extended in the future, with enhancements and specific languages.

Git integration using vim fugitive ๐ŸŽฎ

  • Git keybindings and commends easy and fast with vim fugitive.

Netrw ๐ŸŒฒ

  • Navigate through your project effortlessly with Netrw, your trusty sidekick for efficient file exploration.

Vim-airline โœˆ๏ธ

  • a sleek and customizable status bar for Vim, located at the bottom of your editor.

Vim-devicons ๐Ÿ”

  • Developer-friendly icons to different file types and directories.

Vim-terminal ๐Ÿ’ป

  • A terminal emulator directly within Vim. compile code, and perform other terminal-related tasks without leaving your Vim environment.

Hebrew Mode ๐Ÿš€

  • A mode that support right to left written languages. This feature empowers you so you can use any Language in Nvim.

Native Vim Key Bindings ๐ŸŽฎ

Utilize these native Vim key bindings to navigate and control the text editor efficiently:

  • :w: Save changes to the file.
  • :q: Quit Vim.
  • :q!: Quit Vim without saving changes.
  • :wq or :x: Save changes and quit Vim.
  • j, k, h, l: Navigate through the file.
  • zz: Center the current line on the screen.
  • i, a, s: Enter insert mode.
  • shift+v: Enter visual line mode.
  • z=: Get spelling check suggestions for a word.
  • dd: Delete the current line.
  • yy: Yank (copy) the current line.
  • p: Paste the content you've yanked or deleted.
  • u: Undo the last action.
  • <Ctrl> + r: Redo an undone action.
  • /pattern: Search for a specific pattern in the text.
  • n: Move to the next occurrence of the search pattern.
  • N: Move to the previous occurrence of the search pattern.

Remember, Vim's unique modal nature means that you often need to switch to Normal mode (by pressing Esc) before executing the above commands.

Enhanced Key Bindings for Speed and Fun! โšก๏ธ

Take your editing experience to the next level with these added key bindings:

  • <Ctrl> + c: Copy text to the main clipboard in normal mode.
  • <Ctrl> + v: Paste text from the main clipboard.
  • jj: Quickly exit insert mode.
  • <Space> + r: Showing vim registers.
  • <Space> + sc: Source the vim config.
  • <Space> + a: Select all the text in the document.
  • Q: Format a paragraph into lines.
  • J: In visual mode, move line down.
  • K: In visual mode, move line up.
  • <Ctrl> + z: Toggle spell check.
  • <Space> + e: Open a file explorer.
  • <Space> + o: Open file from file explorer.
  • <Space> + v: Enter V-Block Mode
  • <Ctrl> + t: Toggle a terminal window.
  • <Ctrl> + i: Make the terminal scrollable or switch to input mode.
  • <Space> + y: Split window vertically.
  • <Space> + x: Split window horizontally.
  • <Ctrl> + j, <Ctrl> + k, <Ctrl> + h, <Ctrl> + l: Navigate between splits.
  • <Alt> + Left Arrow, <Alt> + Right Arrow, <Alt> + Up Arrow, <Alt> + Down Arrow: Resize splits.
  • <Space> + t: Switch between tabs.
  • <Space> + c: Create a new tab.
  • <Ctrl> + s: Save the current file.
  • <Ctrl> + q: Save and quit.
  • <Space> + sw: Surround word with a wanted character.
  • <Space> + rw: Replace all occurrences of a word.
  • <Space + ht: toggle Hebrew mode.
  • <Space> + ga: Add changes
  • <Space> + gc: Commit changes.
  • <Space> + gp: Git push.
  • <Space> + gs: Git file status.
  • <Space> + gl: Git log.
  • <Space> + rr: Code Runner.
  • <Space> + dx: Jump to definition, split horizontally.
  • <Space> + dy: Jump to definition, split vertically.
  • <Space> + dt: Jump to definition in a new tab.
  • <Space> + ci: Organizing the imports.
  • <Space> + cf: Doing quickfix.
  • <Space> + hj: Open Mini-Harpoon.
  • <Space> + ha: Add file to Mini-Harpoon.
  • <Space> + hg: Open wonted file from Mini-Harpoon.
  • <Space> + h 1-4: The first 4 files in Harpoon.

Troubleshooting ๐Ÿ”ง

The installation is not working:

  • Make sure you have Git installed on your computer. Open the terminal and run the following command:

    git --version

    If Git is installed, you will see the installed version. If not, you need to install it using your package manager. Then retry the Installation.

  • Check if a file/directory already exists

    Linux & MacOS

    Check if the ~/.config/nvim , ~/Vim_Config or ~/.vimrc already exists. Open the terminal and run the following command to check if they exists:

    • To check if the ~/.config/nvim directory exists, run:
      ls ~/.config/nvim
      Is found, run:
      mv ~/.config/nvim ~/.config/nvim_backup
    • To check if the ~/Vim_Config directory exists, run:
      ls ~/Vim_Config
      Is found, run:
      mv ~/Vim_Config ~/Vim_Config_backup
    • To check if the ~/.vimrc file exists, run:
      cat ~/.vimrc
      Is found, run:
      mv ~/.vimrc ~/.vimrc_backup

    Windows

    Check if the $HOME\AppData\Local\nvim , $HOME\Vim_Config or $HOME\.vimrc already exists. Open PowerShell and run the following command to check if they exists:

    • To check if the $HOME\AppData\Local\nvim directory exists, run:
      dir $HOME\AppData\Local\nvim
      Is found, run:
      mv $HOME\AppData\Local\nvim $HOME\AppData\Local\nvim_backup
    • To check if the $HOME\Vim_Config directory exists, run:
      dir $HOME\Vim_Config
      Is found, run:
      mv $HOME\Vim_Config $HOME\Vim_Config_backup
    • To check if the $HOME\.vimrc file exists, run:
      cat $HOME\.vimrc
      Is found, run:
      mv $HOME\.vimrc $HOME\.vimrc_backup

    This will rename the existing directory/file as _backup. Retry the Installation.

Acknowledgments ๐Ÿ™

A special thanks to the Vim/NeoVim community for their support.

Happy Editing! ๐Ÿชถ๐Ÿ’ป

vim_config's People

Contributors

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