Some Vim Resources

Read more →

Vim Directories Navigation and Autocomplete File Names

Navigating files with Vim is cumbersome. The default settings and the inbuilt file browser netrw are not convenient. I use vim-picker to navigate in a project. vim-picker is a fuzzy file picker for NeoVim and Vim: To use vim-picker you need a program that can traverse your project with a fuzzy text selector. vim-picker will search the current working directory. That’s the folder in which you’ve opened Vim. The Problem You need to open Vim in the project root directory (most often the Git project root), so that you can use fuzzy file and text searching.
Read more →

TIL About How To Create Ordered Lists in Vim Quickly

Today I found a cool trick on the Vim SubReddit: how to quickly create ordered lists. Here’s a screen-cast by rnevius: Steps Let’s say that you have a list: one item another item it’s an item Use <C-v> (CTRL + V), then I to select all lines at the start of the line and add a 0. in front of each: 0. one item 0. another item 0.
Read more →

TIL Copy With Clipboard in Vim Over Ssh

Today I tried using Vim over SSH on a remote machine. I needed to copy some configuration to the server. I opened Vim in the terminal (via SSH): vim config.txt I wanted to paste into the Vim buffer. I tried to use the "+p command in normal mode to paste from the system clipboard. Unfortunately, that didn’t work. [Solution][stackexchange]: The “clipboard” is a feature of X11, so you will need to enable “X11 forwarding” for the SSH connection in “trusted” mode:
Read more →

Code Snippets With vim-vsnip

When you work with a language like Dart, you soon realize that you have a lot of boilerplate code. For example, here is the skeleton code for a stateless Widget in Flutter: class YellowBird extends StatefulWidget { const YellowBird({ Key key }) : super(key: key); @override _YellowBirdState createState() => _YellowBirdState(); } class _YellowBirdState extends State<YellowBird> { @override Widget build(BuildContext context) { return Container(color: const Color(0xFFFFE306)); } } A few code snippets would be helpful.
Read more →

TIL Paste From System Clipboard Into Vim in Insert Mode

Today I learned how to paste into Vim in insert mode (and normal mode). When I write my blog posts, I often have to refer to material from the internet: other articles, blog posts, or books. That means that I will have to copy the title and URL from the web and paste it into my Vim editor. First of all, the "* and "+ [registers][vimregisters] are for the system clipboard.
Read more →

TIL How to Jump to Matching Bracket in Vim

I’ve started using Flutter, the mobile SDK for the Dart language. Dart reminds of Java and JavaScript. It’s quite verbose. If you have nested functions and classes, it’s hard to find the matching brackets and parentheses. Sometimes the start of a function or class is not on your screen, and it’s hard to get a quick visual overview. There are plugins that color the brackets differently, for example, Junegunn’s rainbow_parentheses.vim or luochen1990’s rainbow.
Read more →

Tool: jupyterlab-vim

If you want to make JupyterLab more Vim-like, you can use Vim key bindings and install the jupyterlab-vim extension.

  1. Vim Key Bindings The notebook UI has the option to use Vim, Emacs, or the default key mappings. The documentation shows how. In my Docker image I create a json file to hard code these settings: File jupyter-codemirror-settings.json: { "keyMap": "vim" } Dockerfile:

previous setup - base image, working directory, etc.

Read more →

Lint Your Markdown Files in Vim

Why Should You Lint Markdown? Isn’t the syntax easy enough? There’s nothing that can go wrong. Right? The goal of some markdown linters is to offer a consistent style, and to avoid obvious mistakes (e.g., duplicated headings). Some plugins also provide help in improving your writing style. Linting in Vim ALE is a popular lint engine for Vim and NeoVim. ALE also offers interfaces for markdown linters. You can see a list of all supported plugins on GitHub.
Read more →

Setup Nim With Neovim

Use Neovim as your Nim IDE Why Nim? Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. 1 Nim resembles Python, but the language is significantly faster and statically compiled. Nim comes with meta-programming abilities (like a LISP). You can compile a Nim program into a stand-alone C binary that runs on every system.
Read more →