Live data from Hacker News

Vim Creep (2011)

rudism.com

101–110 of 169 posts

Re: Vim Creep (2011)

#101
post #42

If your editor makes you significantly more productive, maybe you're just writing boilerplate code, or something someone already implemented in a library. Touch typing is similar - it's useful because it removes some unnecessary barriers and thus makes the job more enjoyable, but it won't magically make you a better a programmer.

I agree with this. This whole story gives me "hacker in movies" vibes. Programming isn't about artfully manipulating input devices while watching characters scroll fancifully across the screen. It's about understanding a problem in depth, and considering possible implementations/problems/edge cases. If you spend more time typing than thinking - I will unequivocally call you a bad developer (or a developer who's job i…

Before becoming a coder, I was a professional musician and composer. I think you are completely correct on all counts, but I think the spirit of your post misses one important facet.

I compose because improvising on a single instrument is not enough for me. But it really is like improvising with edits, and being a good improviser will improve your compositions just as your compositions will improve your improvisations. And ultimately, you are doing these things because you love to play and hear music.

The appeal of vim is that it encapsulates programmatic thinking into the act of editing. With each edit, you are making a little program: "select these words with these conditions but not those other conditions, and then, for the first (expression x/y) of them, transform them thusly. Then, select the parent containers, and pipe each one to this file-descriptor to be processed externally."

But you can do this with a few keystrokes, you just have to think ahead a little. That is, it makes the act of programming and entering/editing text one and the same activity, allowing you to do little programmatic improvisations.

I switched from music to code when I realized I got more enjoyment out of code than music. That is, I echo your statements "if you enjoy using it, more power to ya" and "playing music and composing are NOT the same," but also: sometimes playing music and composing are the same, and sometimes the only reason you are composing (or playing music) at all is because it feels so wonderful to do both at the same time.

Re: Vim Creep (2011)

#102
post #48

Earlier quoted context omitted.

My .bashrc is on a quest to turn my yakuake into the better half of vscode. "The shell is my IDE" is definitely true. Though Google takes up a worryingly large fraction of it. Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. bashrc highlights: https://gist.github.com/FeepingCreature/649588a2f6fa27c717bd... - ctrl-G for "directory up" - ctrl-E for "find and open in editor" (…

I have .. as an alias for cd ..

I use "setopt autocd" in zsh. Typing the directory will cd into that directory. Any directory. No aliases.

Re: Vim Creep (2011)

#103
post #24

Earlier quoted context omitted.

My .bashrc is on a quest to turn my yakuake into the better half of vscode. "The shell is my IDE" is definitely true. Though Google takes up a worryingly large fraction of it. Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. bashrc highlights: https://gist.github.com/FeepingCreature/649588a2f6fa27c717bd... - ctrl-G for "directory up" - ctrl-E for "find and open in editor" (…

> Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. There should be. I think `curl cheat.sh/programming+question` does that. There might also be a way to do that with surfraw. I just use DuckDuckGo, it almost always pops up an Stack Exchange answer in the sidebar when I search for something relevant to an SE.

Funny, I have been asking this EXACT question on Linux forums and here for several months.

"How can I have a shortcut that I type, then enter a search query and have the first result open automatically?"

Re: Vim Creep (2011)

#104

Truly a great story! Reminds me of this story... Two years ago I was collaborating with a coworker. Most of our time was in his office. I would look over his shoulder as he typed. He had recently adopted a new IDE and spent considerable time configuring it and learning its features. He was very proud of how productive it made him. Then one day we collaborated in my office instead. I use plain Unix tools, all independ…

My .bashrc is on a quest to turn my yakuake into the better half of vscode. "The shell is my IDE" is definitely true. Though Google takes up a worryingly large fraction of it. Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. bashrc highlights: https://gist.github.com/FeepingCreature/649588a2f6fa27c717bd... - ctrl-G for "directory up" - ctrl-E for "find and open in editor" (…

Didn't even realize you could bind control+key in bashrc. Definitely stealing some of those, thanks for the example!

Re: Vim Creep (2011)

#105

I'm interested in using vim, but I'm not thrilled about trying to set up debuggers when an IDE has it for you. Maybe I'm over complicating it, anyone have a python based suggestion? As a note, I do not have local admin but Vim is installed already.

I use vim (neovim) for everything, but particularly for Python dev. The trio of Linux, tmux, and vim is a powerful combination for any language/framework IMO.

My workflow recently has been CoC.nvim (coc-python plug-in) which lets me integrate flake8/pylint for linting, jedi for completion, and black for auto formatting.

For me those three, linting, completion, format on save are the only IDE like behaviors I need. With Python3.6 or better, I can insert a breakpoint manually whenever I want.

Re: Vim Creep (2011)

#106

I'm interested in using vim, but I'm not thrilled about trying to set up debuggers when an IDE has it for you. Maybe I'm over complicating it, anyone have a python based suggestion? As a note, I do not have local admin but Vim is installed already.

Debug by print statement :)

Re: Vim Creep (2011)

#107

Earlier quoted context omitted.

Don’t stop there! ... for cd ../.. .... ..... They compose naturally too, ..../targetDir I use these so frequently and naturally that I forget that they aren’t built-in to my shell. Also, a shortcut to jump between the last 5 or working directories. Print them with `dirs` and cd to a directory by invoking its number.

How do you make that history? Something like an alias for cd that pushes them onto a queue?

`dirs` is a shell built-in for the directory stack. If you supply it with -v, it will number the output. So the trick is just to make these line up, which is also really just using a feature of `cd` that extracts an entry from the directory stack at position n. My aliases look like this:

    alias dirs='dirs -v'
    alias '1'='cd -'
    alias '2'='cd -2'
    alias '3'='cd -3'
etc.

Doesn't seem like it would make a big difference, but it's very fluid and adopts well to whatever "you happen to working on in the moment."

Re: Vim Creep (2011)

#108
post #24

Earlier quoted context omitted.

My .bashrc is on a quest to turn my yakuake into the better half of vscode. "The shell is my IDE" is definitely true. Though Google takes up a worryingly large fraction of it. Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. bashrc highlights: https://gist.github.com/FeepingCreature/649588a2f6fa27c717bd... - ctrl-G for "directory up" - ctrl-E for "find and open in editor" (…

> Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. There should be. I think `curl cheat.sh/programming+question` does that. There might also be a way to do that with surfraw. I just use DuckDuckGo, it almost always pops up an Stack Exchange answer in the sidebar when I search for something relevant to an SE.

I have a fish function to open StackOverflow in Lynx. I can just do `stack how to write a function in fish shell`.

Re: Vim Creep (2011)

#109
post #72

Can you recommend some resources about using Vim effectively without turning it into an IDE? I'm a self-learned Vim user and I'm sure I could learn a lot by observing experienced vim users. Kakoune has ambitions to be the true "unix way" editor, but it makes some very questionable design decisions like plugins made in shell scripts. For the sake of compatibility. Neovim's decision to fully support Lua appeals to me m…

I'm a self-learned vim user too. I been using vim the wrong way till i watch this video, https://www.youtube.com/watch?v=l8iXMgk2nnY VIM tutorial: linux terminal tools for bug bounty pentest and redteams with @tomnomnom

Now I keep my vimrc simple and use neovim for more complex stuff.

Re: Vim Creep (2011)

#110

I'm interested in using vim, but I'm not thrilled about trying to set up debuggers when an IDE has it for you. Maybe I'm over complicating it, anyone have a python based suggestion? As a note, I do not have local admin but Vim is installed already.

I've been using vim for a bit over a decade now. But throughout that time I bounce between actual vim and vim emulation. Lately I've been concluding emulation is better most of the time.

The problem with real vim is maintaining your setup can be super painful. 95% of the time it's fine, but that 5% can really bite you. For example, this bug, https://github.com/tpope/vim-vinegar/issues/10, struck me out of nowhere. It was super annoying, and took some debugging and exploration to find a work around for. As you can see from the comments, it seemed to impact like 5 people, so you often don't have the advantage of a large audience pushing for fixes. In the end the bug was in vim itself, not the plugin btw.

With all that said, in my humble opinion I would say start learning real vim with say vimtutor (it is possibly already installed on your machine) and use vim to say edit config files or do git commits. When you are getting comfortable with the vim way of editing, switch to an emulator in your IDE. IdeaVim for the IntelliJ family is really good, that's what I use today.

Post reply on HN