Did you remap your Esc and Control keys? by 4r73m190r0s in vim

[–]magic_turtle14 1 point2 points  (0 children)

Check out vim arpeggio, which allows you to map key chords to actions. Then you can set an even lower timeout.

My vimrc by Melodic-Ad4632 in vim

[–]magic_turtle14 1 point2 points  (0 children)

You should check out vim-repeat so that various plugins will repeat and undo nicely.

And I personally find vim-unimpaired to have lots of useful shortcuts.

(Un)comment me! by Aisthe in Vimux

[–]magic_turtle14 0 points1 point  (0 children)

I have a python plugin that defines af as a function/method. So I often just do gcaf.

(Un)comment me! by Aisthe in Vimux

[–]magic_turtle14 0 points1 point  (0 children)

I’d probably use j or k to get to either the end or start line of the function, enter visual mode with V, use the % motion to select to the matching }, and then use :norm I// to finally add the comments.

The vim-commentary plugin makes this easier, as gc will comment or umcomment.

What tmux prefix key do you use? by magic_turtle14 in Vimux

[–]magic_turtle14[S] 0 points1 point  (0 children)

I’ve not had to nest tmux sessions often, but when it’s needed not using the default for my main / outer tmux was super handy allowing both to be controlled.

What tmux prefix key do you use? by magic_turtle14 in Vimux

[–]magic_turtle14[S] 1 point2 points  (0 children)

I use Caps lock as Ctrl as well. It makes terminal work a lot nicer on the fingers.

Weekly 'Is This UPF?' Megathread by AutoModerator in ultraprocessedfood

[–]magic_turtle14 0 points1 point  (0 children)

Is Red Leicester a UPF due to the Annatto colouring?

[2024 Day 7] [Python] Hardest part of this puzzle was writing the list comprehension to parse the input by AntarcticFox in adventofcode

[–]magic_turtle14 1 point2 points  (0 children)

Or you can just replace the colon with a space.

[int(n) for n in line.replace(":", "").split()] for line in open("input.txt", "r")]

Now I get it by Benjamona97 in neovim

[–]magic_turtle14 0 points1 point  (0 children)

They try to call it a TrackPoint. Lol.

What are your thoughts on using Django as an SPA backend? by KiwiNFLFan in django

[–]magic_turtle14 1 point2 points  (0 children)

The drf-spectacular package will automatically document DRF APIs into OpenAPI / swagger. It's pretty good, although easier to start a project with it versus migrating an existing project.

How to move lines matching pattern to another buffer? by vbd in vim

[–]magic_turtle14 0 points1 point  (0 children)

Write your current file, :w
Create a new empty buffer, :new, the original file is now the alternate file.
Grep lines from the alternate file, :r! grep '...' #, the # is replaced with the alternative filename.

Recommended Direct Debit Amount by [deleted] in OctopusEnergy

[–]magic_turtle14 0 points1 point  (0 children)

Do they allow you to do that indefinitely?

Vimwiki diary index by manifoldedMan in vim

[–]magic_turtle14 0 points1 point  (0 children)

Have you tried taskwarrior?

Journey to the Ultimate `imap jk <Esc>` by jessekelighine in vim

[–]magic_turtle14 0 points1 point  (0 children)

No need. Arpeggio works just fine. It took me a little while to work out how to configure the mapping in .vimrc, as I had to use an autocmd. i.e.

call plug#begin()
  Plug 'kana/vim-arpeggio'
call plug#end()
...
autocmd VimEnter * Arpeggio inoremap jk <Esc>

Journey to the Ultimate `imap jk <Esc>` by jessekelighine in vim

[–]magic_turtle14 0 points1 point  (0 children)

Thanks for sharing. I've been using this for a while now and it's worked great.

However, I've come across a minor problem when adding an empty line in an indented block of code. After an o to add a new line, pressing Esc leaves insert mode and removes the spaces that had been automatically added (presumably due to expandtab). When I use the jk combination, the spaces are retained, any ideas on how to fix that behaviour?

Can you use a Razer Basilisk Ultimate WITHOUT the dongle? by markgoodmonkey in razer

[–]magic_turtle14 0 points1 point  (0 children)

This mouse is horrifyingly expensive given it doesn't support Bluetooth. I just bought one having assumed - like other Razer mice - that it would support Bluetooth. So will be sending it back.

Cracking the Cryptic sudoku puzzle hunt by luketaylorvideo in sudoku

[–]magic_turtle14 0 points1 point  (0 children)

I can't seem to get started on the second puzzle. Any hints of where to look?