When I first moved to vim from and ide like vscode or sublime text one of my very first issues was trying to preview ...
Posts tagged: linux
All posts with the tag "linux"
You must use augroup with autocmd in vim | Here's how
If you are running vim autocmd’s without a group, you’re killing your performance. Granted your probably not sourcing your vimscript files with autocmd’s too often, but every time you source that vimscript you are adding another command that needs to run redundantly.
Not silky smooth
...
Code Review from the comfort of vim | Diffurcate
I often review Pull requests from the browser as it just makes it so easy to see the diffs and navigate through them, but there comes a time when the diffs get really big and hard to follow. That’s when its time to bring in the comforts of vim.
This all stems from the great plugin by AndrewRadev. It breaks a down into a project. So rather than poping into a pager from git diff, you can pipe to diffurcate and it will setup a project in a tmp directory for you and you can browse this project just like any other except it’s just a diff.
...
Setup a yaml schema | yamlls for a silky smooth setup
I’ve gone far too long without a good setup for editing yaml files, I am missing out on autocomplete and proper diagnostics. This ends today as I setup yaml-language-server in neovim.
The video for this one is part of a challenge-playlist I put out for myself to constantly improve my dotfiles for all of December.
...
Open files FAST from zsh | or bash if thats your thing
I am often in a set of tmux splits flying back and forth, accidentally close my editor, so when I come back to that split and hit my keybinds to edit files I enter them into zsh rather than into nvim like I intended. Today I am going to sand off that rough edge and get as similar behavior to nvim as I can with a couple of aliases.
Make sure you check out the YouTube video to see all of my improvements.
...
How linux users install a text editor
In honor of the neovim 0.6.0 release, I decided to do a funny skit installing neovim, and fix up my install script in the process as part of my challenge to fix up my dotfiles. I ran into one snag where I was not updating the repo that I cloned. I moved it to the directory I now keep third-party git repos and set it to update with ansible.
The thing that took me the longest to realize was…. I had a path issue pointing me to an old install of the appimage over the fresh build, fixed that up and now we are on 0.7.0 nightly.
...
30 days dotfile ricing
I am challenging myself to 30 days of dotfile ricing. I have been on linux desktop for a few months now and have a pretty good workflow going, I have the coarse edits done to my workflow, but it has some rough edges that need sanded down. It’s time to squash some of those little annoyances that still exist in my setup.
This is primarily going to be focused on productivity, but may have a few things to just look better. This will comprise heavily of aliases, zsh, and nvim config.
...
Update Alternatives in Linux
JUT | Read Notebooks in the Terminal
Trying to read a .ipynb file without starting a jupyter server? jut has you covered.
watch the video version of this post on YouTube
...
I made a neovim plugin
I’ve slowly adding more and more lua functions into my neovim configuration, and recently I noticed a pattern for a class of functions that reach out to run shell commands that can be abstracted away.
Check out the project readme for the most up to date details on the plugin itself.
...
tmux targeted session
This is something that I made up but use every single day, this is what keeps much of what is on my blog or my teams private work wiki going. I have a few very important directories that I have assigned directly to a hotkey for fast session switching.
bind -n M-i new-session -A -s waylonwalker_com "cd ~/git/waylonwalker.com/ && nvim" bind i popup -E -h 95% -w 95% -x 100% "tmux new-session -A -s waylonwalker_com 'cd ~/git/waylonwalker.com/ && nvim'" bind -n M-I popup -E "tmux new-session -A -s waylonwalker_com 'cd ~/git/waylonwalker.com/ && nvim'"
...
tmux detach
tmux detach is a handy tmux command that will quit your current session while keeping it running. The full name of the comamnd is detach-client, detach is a shorthand.
default keybinding
...
notify-send
tmux attach
attach is one of the most useful features of tmux. If you have no interest in tmux for pane and window management, you should use tmux for this. It can be a life saver if you ever get disconnected from the host machine or accidently close your terminal you can connect right back into the session you were just in using attach.
tmux attach
this command will simply attach back to tmux if you are ever disconnected
...
tmux ls
tmux ls will list the sessions that you have running within the tmux server if tmux is currently running. This is handy to combine with commands such as attach.
tmux ls
...
tmux command line
So far we have covered a lot of tmux commands and how they map to keybindings but these same commands can be executed at the command line.
Let’s make a popup that displays our git status for 5s or until we close it manually. We can run the following command at the command line, in a split.
...
tmux copy-mode
tmux copy-mode is a tmux mode that lets you scroll, search, copy, and jump your way through a pane. There are a ton of keybindings for copy-mode, the main ones you will need to know are / for searching down ? for searching up, n for next item, space for starting a selection, and enter to copy the selection. Arrow keys will be used for navigation unless you have specified vi mode, then it will be hjkl.
Default keybinding to get into copy mode is prefix+[.
...
tmux join-pane
Join-pane allows you to join panes that you have broken away from your window, or created in a different window to the window you want it in. As far as I know there is not a default keybinding for it.
Before you can join a pane you must first have a pane marked to join. Once you mark a pane, go back to the window you want to join it to and join-pane.
...
tmux break-pane
Break-pane is a handy tmux command when your layout gets too cramped and you want to just move a split into its own window. Calling break-pane does exactly that, it creates a new-window for you and moves your currently selected split into that window
Default key binding for break-pane
...
tmux zoom
Zooming into the current split in tmux is a valuable tool to give yourself some screen real estate. These days I am almost always presenting, streaming, or pairing up with a co-worker over a video call. Since I am always sharing my screen I am generally zoomed in to a level that is just a bit uncomfortable, so anytime I make a split it is really uncomfortable, being able to zoom into the split I am focused on is a big help, and also help anyone watching follow where I am currently working.
Default key bindings for zooming the current split
...