All Projects → dankilman → vim-kata

dankilman / vim-kata

Licence: MIT license
A vimscript to help you improve your Vim muscle memory.

Programming Languages

Vim Script
2826 projects
shell
77523 projects

Projects that are alternatives of or similar to vim-kata

vim-node-inspect
Interactive node debugger for (n)vim
Stars: ✭ 96 (+113.33%)
Mutual labels:  vimscript
vim-rzip
Extends zip.vim to browse and write nested zip files
Stars: ✭ 22 (-51.11%)
Mutual labels:  vimscript
vim-SystemVerilog
SystemVerilog syntax highlight/indent support in vim
Stars: ✭ 37 (-17.78%)
Mutual labels:  vimscript
lua-vs-vimscript
A simple benchmark comparing Lua performance to Vimscript (because no one seems to care about these nowadays)
Stars: ✭ 32 (-28.89%)
Mutual labels:  vimscript
language-viml
Vim script syntax highlighting for Atom and GitHub.
Stars: ✭ 19 (-57.78%)
Mutual labels:  vimscript
vim-mine-sweeping
mine sweeping game in vim and neovim
Stars: ✭ 41 (-8.89%)
Mutual labels:  vimscript
unfog.vim
⏱ Vim plugin for Unfog CLI task & time manager.
Stars: ✭ 61 (+35.56%)
Mutual labels:  vimscript
vim-twitter
Tweet from inside vim!
Stars: ✭ 26 (-42.22%)
Mutual labels:  vimscript
VimConfig
Configuration files for Vi-IMproved.
Stars: ✭ 23 (-48.89%)
Mutual labels:  vimscript
nvim-toggle-terminal
NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance
Stars: ✭ 54 (+20%)
Mutual labels:  vimscript

vim-kata

A vimscript to help you improve your Vim muscle memory.

Description

I wrote vim-kata to help me improve my Vim skills, I'm hoping it will do the same for others.

It is basically a scripted version of Vim-Katas which in turn is heavily inspired by and mostly extracted from Practical Vim.

In addition to taking some of the katas directly from Vim Katas, I also borrowed extensively from VimGolf and added a few of my own.

The katas in this repo are not meant to be hard to solve. Quite the opposite. For each, there are usually several techniques that can be employed to simplify the task greatly. I believe that going over them frequently can help build muscle memory.

I intend on adding a new kata every time I run into some new trick.

Contributions of new katas and fixes/improvements to the script are most welcome!

Demo

Screencast

Requirements

I'm using neovim on macOS but I don't think I'm using anything neovim specific or very new features.

That being said, the script may need some fixes to work in different setups.

Specifically, windows is not supported but I'll gladly accept PRs that add windows support.

Usage

  • Clone this repo.
  • from terminal, cd into repo directory.
  • from terminal, run ./run.sh

After vim-kata is loaded, the first kata should appear (first being the first in the newly shuffled order).

vim-kata uses the Vim diff display mode.

The upper window is the input text. This is where you edit the text.

The lower window is the output text. This is what your editing should look like. This buffer is 'unmodifiable'.

Once you are done with a kata:

  • <C-J> to load the next kata.
  • <C-K> to reload the previous kata.
  • <C-G> to load a specific kata by directory name (thanks @oflisback).
  • ZQ to quit (mapped to qa!).

Tips

Each kata in the katas dir includes an additional tips file.

This file gives an informal description of the key sequences I tend to use when doing the kata.

The tips are usually trying to strike a balance between fewer keystrokes, while remaining pragmatic and easier to reuse across different similar situations. They are not optimizing for minimal keystrokes like VimGolf does.

Type g? to display tips for the current kata.

Configuration

The config.vim file contains the configuration options for vim-kata.

Adding Katas

All katas are stored in the katas directory.

Each kata is a directory comprised of 4 files: in, out, ext and tips. The in and out are self explanatory.

The ext file is optional. It contains the file extension that should be used. This is relevent when you want a certain kata to have syntax highlighting. If ext doesn't exist, txt extension is used.

If tips exists, it will displayed when typing g?.

To add a kata, simply create a new directory with this structure.

Custom cursor start location

To have a kata start with the cursor positioned at a custom location, add a literal <C-K> (^K) to the in document (not the out!). The kata will load with the cursor at that position, and the literal <C-K> will be removed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].