Giter Club home page Giter Club logo

vimio's Introduction

Vim Settings

screenshot

An article describing key features of this config.

Prerequisites

In order to get all features you might want to install following packages:

Installation

On unix and windows(with bash which can be installed with git):

curl -L https://raw.github.com/gko/vimio/main/install.sh | bash

macOS

In macOS terminal.app don't forget to check the «Use option as meta key»:

terminal

And «Esc+» option in iterm2:

iterm2

Shortcuts

Some of shortcuts(Leader key is comma):

  • Ctrl + s saves current file
  • Leader + s in both select and normal mode initiates search and replace
  • Alt + Up/Down moves line or selection above or below current line(see upside-down for more info)
  • Alt + Left/Right moves character or selection to left or to the right
  • Leader + n toggles NERDTree
  • Leader + m shows current file in NERDTree
  • when in select mode ', ", ( wraps selection accordingly
  • y + m yanks found matches(see yankmatches.vim for more info)

Plugin shortcuts

vim-surround

For general instructions see README

See this issue for visual mode

Coc.nvim

For vim I use Coc.nvim, in their repository you can find their example vim configuration for shortcuts.

nvim-lspconfig

For nvim I use native nvim lsp config. You can find the example config here: example lsp config

Language servers installation
Typescript/Javascript

https://github.com/typescript-language-server/typescript-language-server#installing

Go

https://github.com/golang/tools/tree/master/gopls#installation

Rust

https://rust-analyzer.github.io/manual.html#installation

you may need to install:

Zig

https://github.com/zigtools/zls/wiki/Installation#install-zls

Scala

https://scalameta.org/metals/docs/editors/vim/#using-an-alternative-lsp-client

PHP

https://github.com/bmewburn/intelephense-docs/blob/master/installation.md

List of all plugins and commands

You can find the list of plugins as well as commands that they provide in the init.vim file.

Your config

If you create ~/.vimrc.local it will be loaded before the end of vim-plug. So you can add a custom config + vim plugins of your choice there.

Example .vimrc.local.

Color scheme

You can have a ~/.vimrc_background file, where you keep custom colorscheme settings.

Example can be found here. And you can symlink it as following:

ln -sf ~/.vim/.vimrc_background ~/

Taking notes and TODOs

  • Leader + w + w opens ~/Documents/Notes/index.md
  • :Todo opens ~/Documents/Notes/todo.md in a vertical split and fills in current date

see more info in this article: https://dev.to/konstantin/taking-notes-in-vim-revisited-558k you can find the code here: https://github.com/gko/vimio/blob/de73a9272c29acc6f2ce6d5be7f24cbe113a85b4/after/plugin/shortcuts.vim#L225-L229

and here

https://github.com/gko/vimio/blob/de73a9272c29acc6f2ce6d5be7f24cbe113a85b4/after/plugin/filetypes.vim#L28-L32

Checkboxes

For checkboxes vim-checkbox plugin is installed

Pasting images

With help of md-img-paste.vim you can paste images by using Leader + p (it would store in the same folder as the markdown document in img folder)

Benchmark

Not that it matters, but I get the following startup time:

$ hyperfine "nvim --headless +qa" --warmup 5
Benchmark 1: nvim --headless +qa
    Time (mean ± σ):     200.1 ms ±   6.9 ms    [User: 123.9 ms, System: 63.2 ms]
    Range (min … max):   191.9 ms … 210.9 ms    14 runs

License

MIT

Copyright (c) 2012-2024 Konstantin Gorodinskiy

vimio's People

Contributors

gko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimio's Issues

Decide between NERDTree shortcuts

propose following

nmap ,n :NERDTreeToggle<CR>
nmap ,m :NERDTreeFind<CR>

or

nmap <C-n> :NERDTreeToggle<CR>
nmap <C-m> :NERDTreeFind<CR>

prettier/nerdtree conflict

when using prettier fix, and clicking on QuickFix window instead of going to the file we're opening nerdtree

«false» file

Sometimes is created. Presume it comes from trying to save Netrw

some tweaks

Some minor tweaks for configuration

  • refactor (mapping mess, shortcuts etc.)
  • update readme.md with actual info
  • nova airline theme instead of base16
  • go autocomplete
  • async ctags
  • ctags config update

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.