When working on large(ish) code files, sometimes it is easier to fold rest of the code from that file and focus on one “block” at a time.
I use the word “block” because based on the context, it means different things. It could be as big as a class (if the file contains multiple classes) or as small as a if-else block.
But this functionality is not always turned on.
Continue Reading »
NvChad is yet another neovim starter kit.
Creator of NvChad is on the VimUser’s Telegram Group. So I was intrigued to try NvChad. (I had tried it a while ago, but decided to visit it later. That “later” is now)
One of the plugin I use is Telekasten. It reminds me of Dendron, another tool I used to use (requires VSCode, which I consider too heavy. But Dendron now works without VScode as well.
Continue Reading »
Earlier I imported the data to locally running Elastic (via Docker)
But others in my team could not run Docker on their machines, so we decided to use a hosted Elastic server.
The steps to import the data were the same. Well, almost. Because this was a hosted instance, it would not allow operations without authentication. I got the following error:
dump ended with error (get phase) => UNAUTHORIZED: {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}},"status":401} It took me a while to figure it out, but I did.
Continue Reading »
Some time ago, I started using kitty terminal emulator. I used Alacritty for a long time. But Alacritty is meant to be minimalistic in a sense it does not even have concept of having different tabs.
The suggestion/solution is to use tmux (or like) to manage different shell instances.
And I did that.
And learnt a great deal about tmux in the process.
I don’t regret it one bit.
But sometimes, tmux gets in a way of how terminal based programs look (and behave) when executed inside tmux.
Continue Reading »
Official instructions are here but it did not work for me.
I did not understand Drag kitty.icns onto the application icon in the kitty info pane part. I tried dragging the icon, but could not make it work.
I gave up. I can live with the default icon.
But then I came across the following instructions here.
Clear instructions that I can execute from inside kitty 😄
cp /tmp/kitty.icns /Applications/kitty.app/Contents/Resources/kitty.icns rm /var/folders/*/*/*/com.
Continue Reading »
This is the first time I’m setting up elasticsearch
While one can set it up natively via brew I have learnt longtime ago to use docker for complex, server type applications.
Elastic search’s official document also suggests the docker in their Getting Started.
I’ve made summary of the steps on my PKM. Search elastic on the site, since URLs are likely to change.
Important thing : Create a local user (I called it dev) and make it superuser
Continue Reading »
I wrote about espanso in past here and here, and I’ve been using it ever since.
Since helix is (for now) terminal-only editor, my espanso shortcuts work very well with it.
e.g. I can type :smile: and get 😄, and type thru and get through (Automatic correct the usually misspelled words 🎉)
Espanso works well with neovim-in-terminal (and Emacs), but I use Neovide GUI, where they don’t work.
One of the thing that I thought was missing from Helix editor was integration with a decent grammar checker tool. On Emacs and neovim, I use ltex-ls.
To my surprise, it works well (I’m using it already) with Helix.
It is probably not well documented though. I had to look through the github issues, but I did come across the solution.
It is straightforward though.
Download the latest release of ltex-ls from here.
Continue Reading »
I came across Helix Editor on youtube when watching about neovim related video.
It is vim like editor. That is, a modal editor.
But it is different in one fundamental way, it terms of how commands work.
In (Neo)vim, it is action followed by object. So delete word becomes dw But in Helix it is other way round. Object followed by Action. So it is word delete hence wd
It takes a bit getting used to.
Continue Reading »
In my tour of Neovim starter kits, I landed on SpaceVim
I started my Emacs journey with Spacemacs, and used it for couple of years before settling on Doom Emacs.
Spacemacs inspired SpaceVim.
I had liked the mnenomic keybindings in Spacemacs (and now in SpaceVim)
But Spacevim is different from how other starter kits handle configuration.
Last week, I tried DoomVim (inspired by Doom Emacs) and NVChad (and “Neovim from scratch” by same folks as LunarVim) They all had similar configuration, based on lua
Continue Reading »