Five lines I put in a blank .vimrc
121–130 of 133 posts
Re: Five lines I put in a blank .vimrc
#122Kinda derailing the thread but might ask anyway, does anyone got recommendations on dot files synchronization through personal devices? I'm currently using a git+ss repo on a personal server. I wonder if there are more convenient ways to do this.
If I were on a fresh VM with an internet connection and wanted my vimrc, I would do
curl https://dotfilehub.com/knoebber/vimrc >> ~/.vimrcRe: Five lines I put in a blank .vimrc
#123Earlier quoted context omitted.
I once had to connect to machines regularly where I did not have a home directory. This happened so often that I wrote a wrapper to log in: It would log into the remote machine using Expect, then it would send a command to the remote end that tested whether a home directory already existed. If so, it spawned a new shell in it. Otherwise it created a "home directory" in /tmp, pulled a tarball from a server, and extrac…
That's cool. Do you have a write-up of this somewhere?
Re: Five lines I put in a blank .vimrc
#124Earlier quoted context omitted.
inoremap jk inoremap kj are essential to me... press both at the same time and you exit insert mode regardless of which one gets pressed slightly faster and you never leave the home row and if you press it when you are not in insert mode it's basically a nop unless you are at the start or end of the file. even if you are you might move down or up a line accidentally but i've never had that happen personally.
Then you can't type words that have jk or kj in them, right? :) Depending on languages used it could be a blocker
Re: Five lines I put in a blank .vimrc
#125Earlier quoted context omitted.
If your vim is compiled with the correct flag for GUI operations (I forget which), you can yank/delete text into the * or + registers to make it available to the system clipboards. This won't bring the line numbers, and lets you avoid using the mouse.
I use vim in a terminal, the way the gods intended, not gvim. ;-P But apparently according to peer comments, there are ways to yank into clipboards, which is pretty cool.
Re: Five lines I put in a blank .vimrc
#126The swap file saved my work a number of times. If you never use recover and use Vim regularly, then go ahead and disable it; if you haven't used it because you don't know how to use it or you only rarely use Vim, then I'd encourage you to either try it first or leave it enabled (as it is by default) until it becomes a nuisance. And like u/strogonoff, I also disable line numbers, but that's just personal preference of…
inoremap jk inoremap kj are essential to me... press both at the same time and you exit insert mode regardless of which one gets pressed slightly faster and you never leave the home row and if you press it when you are not in insert mode it's basically a nop unless you are at the start or end of the file. even if you are you might move down or up a line accidentally but i've never had that happen personally.
Re: Five lines I put in a blank .vimrc
#127It’s not enough. You should go all the way: set nobackup set nowritebackup set noundofile set noswapfile I explain why at https://lee-phillips.org/badvim/ Also, it’s best to just have one instance of Vim running, in server mode, so you can send files to it from the command line.
I laughed at the poetry of the line "I don’t really want Vim to litter my filesystem with all of these piles of nervous energy." Truth
Re: Five lines I put in a blank .vimrc
#128What is the kakoune equivalent of these options?
There is no ignorecase option, `(?i)` is the way to enable that in a regex, you can `map global normal / /(?i)` to auto insert-it
incsearch is the same
`add-highlighter global/ number-lines` display line numbers for all buffers
There is no swap file in Kakoune.
Re: Five lines I put in a blank .vimrc
#129Kinda derailing the thread but might ask anyway, does anyone got recommendations on dot files synchronization through personal devices? I'm currently using a git+ss repo on a personal server. I wonder if there are more convenient ways to do this.
I have tried a custom linking script, Ansible, and stow. The best I have found is to just use a bare git repo based off of: https://www.atlassian.com/git/tutorials/dotfiles The idea is to make an alias that runs git so that it treats your home directory as a git repository and you can directly commit them. I would recommend bypassing that article's `config config --local status.showUntrackedFiles no` setting and sett…
Would be great if I could combine with a local secrets engine. Like Hashicorp Vault but local.
Re: Five lines I put in a blank .vimrc
#130Keeping the swapfile on is really helpful when I accidentally open the same file in two different vim editors. But I do recommend configuring vim to place swapfiles in a different location, so you’re not scattering them all over your disk.
I actually went full on in the other direction and often have multiple vim instances working on the same file. It feels so much better than having to deal with swap file error messages. With the below it reloads the file when the window gets into focus. Super helpful when working in lots of terminal tabs. You just have to get into a habit of saving after every change as it conflicts otherwise. " check for and load fi…
in the few cases where i really need to open the file multiple times i use tmux to allow a shared view.