4 ms·
Mixed feelings about this. I think there is another skill, somewhat related to programming, that we need to teach before programming: text slicing and dicing.
by DanielBMarkham 14y ago
Mixed feelings about this.
I think there is another skill, somewhat related to programming, that we need to teach before programming: text slicing and dicing.
The entire point of a programmable powerful editor is to apply text transforms more quickly than you could with click and type. If that's important, then we should teach it first. I personally believe it is important because of the huge productivity multiplier it gives programmers.
- Shorel 14y agoNow I'm thinking about Bart Simpson writing the 30+ sentences in the blackboard in one go, by using 30+ input cursors in parallel.
- evoxed 14y agoRelated: I think perhaps the most valuable aspect of teaching beginners how to use vim/emacs (in a basic sense at least) is that it isn't necessarily just for programming. You can "practice" with just about everything you write, and if you stick with it become even more efficient in all your other work outside of programming. I started writing almost all of my letters and essays in vim because it's so much faster and in one environment that I can modify to my own needs.
- esrauch 14y agoWhat kind of settings do you use when in letter-writing-mode? I feel like vim is fairly useless to me for anything that isn't 80 (or 100) character max line based, which isn't how I write letters at all. If I autowrap then its a giant pain to reflow the text (maybe there's an easy way to do that), and if I don't then simple navigation is a giant pain.
- plorkyeran 14y agogq rewraps the current selection.
- evoxed 14y ago:set tw=80 :set wm=4 (wrap margin) Or :help gq to see plorkyeran's suggestion.
- nprasanna87 14y agoIn your vimrc(it's a single line): " <Leader>W -> Blog mode. Allows for using vim to write long sentences and paragraphs nnoremap <leader>W :set colorcolumn=0<cr>:set syntax=markdown<cr>:nnoremap j gj<cr>:nnoremap k gk<cr>
- BruceIV 14y agoThey're orthogonal skills though - new programmers have a hard enough time with the concepts of arrays and variables, and won't be productive until they get those straight, no matter how leet their text editor skillz are. I think the OP is right to suggest learning one at a time.
- gknoy 14y agoI agree. Text slicing and column-mode editing are the bees' knees. Being able to use it effectively is similar to being able to leverage multiple layers in an image editor: you won't want to go without it when it's the Right Tool. In Eclipse, control-shift-a will toggle it, and in Komodo you can just use alt-shift to select in a column. (I like Eclipse's mode toggle better, frankly.) It exists in several other editors, of course -- I think Sublime Text 2's demo reel includes it.
- jerrya 14y agoYou may wish to investigate the early non-screen editors like teco (DEC), ted(MULTICS), or qx (UNIX).