
a pile of words in a trenchcoat im new heresay hi to me i would like to meet you :)
297 posts
If I Remember Correctly, You Mentioned Using Vim As Your Day-to-day Text Editor. I'm Also A Fan Of Vim
If I remember correctly, you mentioned using Vim as your day-to-day text editor. I'm also a fan of Vim and I've finally started to customize it to make it my primary Python editor; any particular plugins you'd suggest, or tips and tricks that you can offer?
Alright you asked for it this is going to be long.
vim and its friends are very handy, there's a lot you can do to make it more livable from the get go without any plugins at all.
My neovim config is here, it's a little out of date but if you want to reference what plugins and so on I have, here

Enable the mouse! It's really handy to be able to click between tabs, around a file, resize splits, etc. when you want to. In your config file put:
set mouse=a
Presumably you already have your movement in vim pretty down pat, but it's worthwhile to go over a movement hint list like this one from Bart Kummel to see if there's any you missed, using G and gg to move to the top and bottom of a file is super handy. Knowing that u and C-r will undo and redo is also good.
Learn how vim's integral split and tab features work. You can :sp and :vs to split horizontally and vertically, and C-w+<direction> to move between splits, alternatively use your mouse. To create a new tab, you can :tabedit <filename> or :tabnew <filename> to open or create a new file in a tab, and then use gt and gT to move through tabs (go tTab) quickly, or again, your mouse. With mouse enabled you can even drag to rearrange tabs and resize splits, way easier than memorizing the commands. More detail on tabs here and splits here.

Learn to use ctags in vim. At the top of your current programming project, run ctags -R . to build a ctags database for the project. Then, in the file, you can use C-] to jump to the definition of any function or variable, and C-t to move back up the stack of tags you've followed. You can even C-w+} to preview the definition in a split. There's way more features, you can learn them here.
Get familiar with visual mode, which will let you select a chunk of text and then cut, paste, find/replace, etc. it. Press in Normal mode to enter Visual mode, and then move around like normal, selecting text. You can then d to delete and cut to clipboard, y to copy to clipboard, or you can apply a find/replace on the selection. Of course, if you've enabled your mouse you can also just click and drag to select.

Learn your regexes, they're an unbelievably fast way to find and edit files. You can do /<regex> to immediately search for the next instance of <regex> and then move to the next and previous match with n and N. Your regex can just be the exact thing, but if you get a handle on basic regex features like word boundaries, repeats, and sets, you can construct very fast and effective searches.
With regexes you can also do find/replace, using :s/find/replace to immediately fire that off on the line you're on, or to affect the entire selection in a visual block. Very useful for renaming functions and variables.
Learn tmux, which isn't a vim thing, but is a general purpose terminal multiplexer. With a tmux session you can spawn multiple terminals in one window, each running their own shell, in separate tabs and splits, and you can background an entire session without closing it. Very useful if you want to create a self-contained programming environment, at work I have a separate tmux session for each bug I'm working on which may have a debugger, several code windows, multiple file explorers, etc. I won't cover tmux in detail here, but I wrote about it for some undergrads once and you can find my notes on that in section two of this document. If you're configuring tmux, hit me up, but my config is not suitable for general consumption.

That's about all the vim techniques I use on a daily basis at work, there's way more depth you can get into to go even faster but with those you can do all the things a conventional editor's Edit menu would do without ever leaving your keyboard. Less commonly used features includes the macro system, folds, and using the built-in file browser. I barely touch these.
Plugins:
I don't use a ton of plugins, I stick to a relatively vanilla vim experience because it means that you wont' be so lost when you sit down at someone else's config. I recommend mostly adding rather than changing, although I absolutely do have things like remapping my leader key to ,
I also don't have a ton of my plugins setup because this is a new computer, so I won't have demo photos.
I use neovim, which is a vim fork that focuses on being more modern, having saner defaults, and expanding the programming interface to languages other than vimscript. This is nice, because it means you can write plugins in a modern language like python, rust, or C++. For all intents and purposes to the average end user it is indistinguishable from vim, but the plugins I use might sometimes be nvim specific and I'll try to call out vim equivalents if I remember.
Tim Pope is the most influential vimscript programmer of the generation, having written everything from git managers to plugin installers to the de facto standard aftermarket vim default configuration. Flip through his repos and see if anything strikes your fancy. Many people like vim-surround which enables modern-editor style automatic insertion of matching braces, apostrophes, angle brackets, etc.
Neovim Completion Manager, an autocomplete tool built for Neovim. Combine it with Jedi to do intelligent python completion, pyclang for C/++ completion. The vim equivalents would be YouCompleteMe or Deoplete which is apparently now ddc. I've no preference, having used both a little, but YouCompleteMe is more popular.
Ale by w0rp, a linter that will mark out syntax errors. Nonessential, but a handy little thing, saves a lot of time, gives you relevant compiler errors right where they are.
ctrlp, a clone of sublimetext's infamous ctrl-p fuzzy search, a good way to quickly switch files in vim. Vaguely mash out something that looks like the file you want to open, and ctrlp will usually find it.
IndentLine, especially good for Python, shows vertical lines and leading spaces at your indent levels like you'd find in modern graphical editors.
That's about everything I use regularly, you can really go deep in on customizing vim into your perfect IDE, but I like to keep it light.
-
evgeniiy liked this · 1 year ago
-
stuffsdrawer reblogged this · 2 years ago
-
aspergillosis reblogged this · 2 years ago
-
wildfireimaginaryspaces liked this · 2 years ago
-
cthulucactus reblogged this · 2 years ago
-
cthulhubert reblogged this · 3 years ago
-
lookthisuplater reblogged this · 3 years ago
-
schpeelah reblogged this · 3 years ago
-
mc2bp reblogged this · 3 years ago
-
vash3r reblogged this · 3 years ago
-
neuroschen reblogged this · 3 years ago
-
vash3r liked this · 3 years ago
-
word-heap reblogged this · 3 years ago
-
vaguely-none liked this · 3 years ago
-
notarealwelder reblogged this · 3 years ago
-
notarealwelder liked this · 3 years ago
-
infernalinvert liked this · 3 years ago
-
kelp-of-discontent reblogged this · 3 years ago
-
gender-trash liked this · 3 years ago
-
schpeelah liked this · 3 years ago
-
serepith liked this · 3 years ago
-
shacklesburst liked this · 3 years ago
-
thehylianbatman reblogged this · 3 years ago
-
jenlog reblogged this · 3 years ago
-
cthulhubert reblogged this · 3 years ago
-
fluxion-fluent liked this · 3 years ago
-
eightyonekilograms liked this · 3 years ago
-
sponsoredbydestiny liked this · 3 years ago
-
paradigm-adrift liked this · 3 years ago
-
sylvamea liked this · 3 years ago
-
actual-edelwood-tree reblogged this · 3 years ago
-
ms-gelgoog liked this · 3 years ago
-
kwarrtz liked this · 3 years ago
-
mrwiseandshine liked this · 3 years ago
-
intimate-mirror reblogged this · 3 years ago
-
intimate-mirror liked this · 3 years ago
More Posts from Word-heap
i'm in the timeout corner for being too angry at the microwave :(((((
Tumblr is Tracking Shared Links
It looks like Tumblr @staff have finally implemented tracking garbage into shared links in the Tumblr mobile app. It took them years and years, but Tumblr is finally making an attempt to track shared links you click or links you share with friends.
When you share a post and choose to “copy” a link to your clipboard, you can see that they use their (new?) url shortener, at.tumblr.com. The shortened URL appears to contain: your blog name; either the ID of the destination post, or the short string associated with the post; and an alphanumeric string. Eg:
https://at.tumblr.com/pizza-and-ramen/im-fucking-dying-this-is-hilarious/uqndb20nkyob
The shortened URL redirects you to the destination link, but with 2 URL parameters: _branch_referrer and _branch_match_id. Both are associated with a third-party analytics tool, branch.io. Eg:
https://pizza-and-ramen.tumblr.com/post/118684413624/im-fucking-dying-this-is-hilarious?_branch_referrer=H4sIAAAAAAAAAxXEwQ2AIAwAwIlKH8aP21RQaaSAUIIyvZpczqvmuiCSGm2yhmJsEsw8BgFFB4Vki8gCe7MnxwPc86%2BeK3w8ByqcWsU7jHnql0u99xd0v%2FAuVQAAAA%3D%3D&_branch_match_id=1104914739086906151
_branch_referrer appears to be another shortened at.tumblr.com URL, except it’s been gzipped, base64 encoded, then URL encoded. Eg:
H4sIAAAAAAAAAxXEwQ2AIAwAwIlKH8aP21RQaaSAUIIyvZpczqvmuiCSGm2yhmJsEsw8BgFFB4Vki8gCe7MnxwPc86%2BeK3w8ByqcWsU7jHnql0u99xd0v%2FAuVQAAAA%3D%3D
URL decode to:
H4sIAAAAAAAAAxXEwQ2AIAwAwIlKH8aP21RQaaSAUIIyvZpczqvmuiCSGm2yhmJsEsw8BgFFB4Vki8gCe7MnxwPc86+eK3w8ByqcWsU7jHnql0u99xd0v/AuVQAAAA==
base64 decode to (in hex for legibility):
1F8B0800 00000000 000315C4 C10D8020 0C00C089 4A1FC68F DB545069 A4805082 32BD9A5C CEABE6BA 20921A6D B286626C 12CC3C06 01450785 648BC802 7BB327C7 03DCF3AF 9E2B7C3C 072A9C5A C53B8C79 EA974BBD F71774BF F02E5500 0000
and unzipped with gunzip:
https://at.tumblr.com/pizza-and-ramen/im-fucking-dying-this-is-hilarious/xlz53wqdowww
which directs to the post with the same _branch_referrer but a new _branch_match_id:
https://pizza-and-ramen.tumblr.com/post/118684413624/im-fucking-dying-this-is-hilarious?_branch_match_id=1104899685865808870&_branch_referrer=H4sIAAAAAAAAAxXEwQ2AIAwAwIlKH8aP21RQaaSAUIIyvZpczqvmuiCSGm2yhmJsEsw8BgFFB4Vki8gCe7MnxwPc86%2BeK3w8ByqcWsU7jHnql0u99xd0v%2FAuVQAAAA%3D%3D
_branch_match_id, according to this stackoverflow answer, is an identifier unique to you, used to track users. It could be based on browser fingerprinting, as branch.io’s branch_match_id is.
Anyway, there’s not a terribly easy way to avoid this tracking from the Tumblr mobile app, but if you get a link that has the id, not the string, you can modify it to the format of blog.tumblr.com/ID, like so before sending it to a friend:
https://at.tumblr.com/pizza-and-ramen/118684413624/uqndb20nkyob
https://pizza-and-ramen.tumblr.com/118684413624
Alternately, you could paste the link in your browser, allow it to redirect, then remove everything past the ? at the end, eg:
https://pizza-and-ramen.tumblr.com/post/118684413624/im-fucking-dying-this-is-hilarious?_branch_referrer=H4sIAAAAAAAAAxXEwQ2AIAwAwIlKH8aP21RQaaSAUIIyvZpczqvmuiCSGm2yhmJsEsw8BgFFB4Vki8gCe7MnxwPc86%2BeK3w8ByqcWsU7jHnql0u99xd0v%2FAuVQAAAA%3D%3D&_branch_match_id=1104914739086906151
https://pizza-and-ramen.tumblr.com/post/118684413624/im-fucking-dying-this-is-hilarious
Anyway, this has been my privacy rant of the day. Thanks for reading, and let me know if you know more about this than I do!
ok i. love haskell
Most people wouldn't say that Stack Overflow is in any way obscure, but then again most people don't really go below the surface of simply asking and maybe answering. Most people have no idea that, for example, Stack Overflow has it's own chat server which, although it hasn't been updated in years, is quite possibly the best system of it's type that I've ever used. In fact, there are actually two different servers, one for Stack Overflow and one for the rest of the Stack Exchange Network.
But that's how I got my start to being online. Way back when I didn't even have any social media, I made a Stack Overflow account to ask a terrible (now deleted (not by me (pretty sure it got roomba'd))) question about some especially tricky programming question that I couldn't solve after days of searching. As I used the site more, I began learning more about how it functions and the systems that underpin it, and eventually found my way to meta and then to chat, where I found a very friendly room of people who were the first real software engineers I got to know.
The only problem is that the userbase on stack overflow skews pretty old, especially compared to me at the time, and I think I picked up a lot of my internet-speak from them. Even now, when talking to closer to me in age, I frequently get called out for sounding old or being a boomer, which I think is on account of the dialect of internet I first picked up.
Also, feel like I gotta throw this in, but I know stack overflow gets a lot of shit thrown at it for being hard to approach and for being rude/unwelcoming/mean/heavy handed etc etc I'm sure you've heard the refrain. But as someone who's gotten to know how all these systems work, I promise it isn't all that scary once you understand how to approach it. Anyways, I'm getting off topic, but maybe I'll post about how to be a new user on stack overflow one of these days :P
What was your obscure chatroom/forum that you used before social media? Don’t say Gaia Online or Club Penguin. I’m talking obscure.
I would like to take my dash and print it out like a newspaper. I want to thumb through its pages. I want to sit on a bench in the park and just read my dash, without having to stare at my tiny phone with the brightness at ten million on the shitty app to look at each post one by one and scroll scroll scroll scroll scroll. I want to hold it in my hands. That would be nice :)