neo(vi)m, one dream at a time

vi is a text editor, and possibly a cult.

Once I wanted to learn taskwarrior and I created a topic to track my challenges (Learning Taskwarrior, one dream at a time - Science and Technology - talkgroup) and it helped me process my thoughts; I’m not sure where I got the “one dream at a time” thing from, except when learning a new topic deeply, I suppose I tend to think about it at night, like a review of the topic in my head…

Anyhow, despite having gotten a powerful new laptop, part of my personal computing is using precise tools, and vi is such a tool for me. I’ve yet to incorporate editor configurations into my personal computing cloud, so that will be a lot of what this topic is about.

A post was split to a new topic: Previously, while discussing vim…

I’m going to try going with neovim again. I tried installing from the PureOS repos, but it is still on 4.4, whereas I want the recent 5.0 release. I tried installing from Flatpak, but it uses a non-standard location for config, as well as a weird way to launch from the terminal, so I removed that. Ultimately I am making it portable, like hugo and fossil:

curl -LO
chmod u+x nvim.appimage
mv nvim.appimage ~/.local/bin/nvim

And I get:

maiki@deck:~$ nvim --version
NVIM v0.5.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az87-829

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "

Run :checkhealth for more info

So… in the past I’ve found one or 17 tutorials/config files online, and I’d smash them together into something that I could definitely use, but that knowledge wasn’t persistent enough to withstand a transition to a new system.

Now I’m at the point to decide which editor I will carry into my personal computing, so that means, “forget the scaffold, we’re building a foundation here!”, which surely is more prudent than it sounds, architecturally…

Anyhow, I’ve got neovim installed, so it’s time to explore, in two phases:

  1. Defaults and overrides
  2. Plugins/addons/weird stuff that doesn’t fit into ~/.config/nvim/init.vim

o (lowercase o) opens a line below the one you are on and goes into insert mode.

G (uppercase g) goes to the last line in the file.

So, Go will go to the end of the file, open a new line and insert (ready to type).

When opening a file, + (plus) and a number will place the cursor on that line number, and sans a number will place it on the last line of the file: nvim +

I grabbed the init.vim from Neovim configuration for beginners | by Rio Nyx | Geek Culture | Medium, so currently that means:

set nocompatible            " disable compatibility to old-time vi
set showmatch               " show matching 
set ignorecase              " case insensitive 
set mouse=v                 " middle-click paste with 
set hlsearch                " highlight search 
set incsearch               " incremental search
set tabstop=4               " number of columns occupied by a tab 
set softtabstop=4           " see multiple spaces as tabstops so <BS> does the right thing
set expandtab               " converts tabs to white space
set shiftwidth=4            " width for autoindents
set autoindent              " indent a new line the same amount as the line just typed
set number                  " add line numbers
set wildmode=longest,list   " get bash-like tab completions
set cc=80                  " set an 80 column border for good coding style
filetype plugin indent on   "allow auto-indenting depending on file type
syntax on                   " syntax highlighting
" set mouse=a                 " enable mouse click
set clipboard=unnamedplus   " using system clipboard
filetype plugin on
set cursorline              " highlight current cursorline
set ttyfast                 " Speed up scrolling in Vim
" set spell                 " enable spell check (may need to download language package)
" set noswapfile            " disable creating swap file
" set backupdir=~/.cache/vim " Directory to store backup files.

I feel I live in the tension between narrative writers and programmers. Most of the time that feeling has no relevance: text editing is one arena in which it very much counts.

The reason it takes so long for me to learn nvim is because I don’t need anything more than basic editing, most of the time.

And still, I shall persist. What I’ve gained over the years is valuable on a daily basis.

/me sighs

I wish I had the mental energy to commit to learning more neo(vi)m, but folks, I’m kinda running on fumes.

Anyhow, I wanted to note: I’d like a way to comment lines so I may “quote” them by prefixing each line with the “greater than” bracket (>), so I may quote using the markdown vernacular, of which I am acquainted.

(Sorry; I’m in what I refer to as a “historical” mood [not to be confused with an “ahistorical mood”, which is strikingly similar and unfortunately much more humorous… :person_shrugging:])

Okay folks, how do I markdown quote block of text in nvim?