Oil and vinegar - split windows and the project drawer

It’s a reposted post. See the original post Do you avoid using Vim’s split windows because they’re confusing? That might be a problem of your own devising. If you’ve bolted a project drawer onto Vim, then you’ve added unnecessary complexity to Vim’s otherwise minimal interface. Split windows and the project drawer go together like oil and vinegar. I don’t mean to say that you can combine them to create a delicious salad dressing. I mean that they don’t mix well! ...

January 6, 2024 · 5 min · ChaosNyaruko

What do I learn from trying to "master" an editor

Intro I am a Vim user(and now Neovim, wish that it wouldn’t be “was”). To be honest, I am not an expert on vim, and configuring my own vim really takes some time, but I really find something useful during my “playing” time. Apologies for my poor English in advance. Fun This is the most important thing. Defining my own editor is just like playing LEGO, even more interesting. There exists infinite possibilities in this amazing editor (So is Emacs/VSCode/…). You can almost create anything you want about text editing in this environment. Thanks to Bram, may he rest in peace🙏 . ...

August 26, 2023 · 3 min · ChaosNyaruko

Bulk rename files with Vim

Unix Shell Create list of files \ls | vim - The backslash tells your shell to disregard any aliases for ls; we need plain output with no color. Vim will open, displaying a list of file names. Change to list of shell commands In Vim you now have one file name per line. We need to change each line to be a valid stand-alone shell command. For example, to rename the files to lowercase: ...

August 19, 2023 · 2 min · ChaosNyaruko

Vim or Neovim in 2023?

Prologue Vim is one of the most famous based text editors(somehow infamous for serveral reasons). Neovim is a really weel-known fork of Vim, which even has its own community. So which one should I choose? It depends on your workflow and usage scenarios. I will introduce the pros and cons of both from my point view. Hope it will help you with the selection. Neovim vs Vim Neovim Pros/Vim Cons: Neovim has better default settings, which means you don’t need to “set nocompatible”/“set backspace”/…, see “:h nvim-default” for details in Neovim. Neovim has a more open and active community. (Check the “job control” story if you are interested). However, it depends on your attitude towards open source practice. Neovim has built-in LSP/treesitter support. Neovim makes Meta key available by default. Neovim uses Lua as first-class configure language, with high performance Lua-JIT as its engine. Lua is more like a programming language. Basicly all plugins written for Vim is available for Neovim, because Vimscript is still supported. The Vimscript engine is reserved. There are still some others advantages, which I personally don’t so much care, see offical website for details. ...

August 1, 2023 · 2 min · ChaosNyaruko

How to learn (neo)/vim?

Prelude This article is for those who decide to use vim/neovim or the key bindings. If you want to figure out whether you should learn it, you can refer to my previous article. The followin’ suggestions are given in my experience, may or may not fit you. Just take them as a reference. Hope it helps. Learn Vim Step by Step Learning the key bindings first. You don’t have to know everything, just follow “vimtutor”, know the basic usage of vim’s “modal”/“operator”/“motion”/“text object”/“regex”/… stuff. You don’t have to remember all the details at once, everyone improves the retention by daily usage and training. Once you know the basic key bindings, you can use “vim” in most of your IDEs/editors/… . Download the vim plugin and you can get familiar with vim’s way to operate text. The only point is “sticking to it”, even it will slow you down at the beginning. Now it’s time to know vim’s wonderful features and plugins. There are indeed some “distributions”, such as LunarVim or SpaceVim. However I personally don’t recommend you to use it directly. Two reasons for this: There are often other “layer"s in these distributions. You will have to learn the design as well, otherwise you will struggle to cope with problems. You will lose the happiness about the process of assembling your own PDE, and nobody knows your habit more than yourself. But I strongly recommend you to take them as your references, such as some config snippets or awesome plugins. They are really good resources for you to build your own PDE from scratch. Write your own plugins, contribute it to the community! Epilogue Enjoy yourself in doing “useless” things!

May 8, 2023 · 2 min · ChaosNyaruko