|
Civil Twilight posted:Is there a reason to do that when you have expandtab set? vi doesn't have an expandtab option.
|
# ? Jun 5, 2013 02:44 |
|
|
# ? May 8, 2024 04:28 |
|
Fair enough. I don't use non-vim vi for anything other than editing config files on old bsd servers.
|
# ? Jun 5, 2013 02:46 |
|
A nifty trick I stole from Learn vim script the hard way was to remap the arrow keys and Esc to insert "use the home row you dummy!" instead of moving the cursor / leaving Insert mode. A few times of having to un-do that and I broke my bad habits rather quickly.
|
# ? Jun 5, 2013 13:23 |
|
So vundle is pretty nifty.
|
# ? Jun 5, 2013 16:34 |
|
astr0man posted:So vundle is pretty nifty. Yeah, I tried it out for a bit, but ended up going back to pathogen. Everyone should probably use one of them, just pick whichever feels right.
|
# ? Jun 5, 2013 17:09 |
|
astr0man posted:So vundle is pretty nifty. I've been very happy with it; using vundle to manage my stuff is more pleasant than pathogen since I have all my vim config in a git repo, and submodules for pathogen are a pain.
|
# ? Jun 5, 2013 19:29 |
|
PYF color schemes. I use this updated version of wombat: http://www.vim.org/scripts/script.php?script_id=2465
|
# ? Jun 5, 2013 22:46 |
|
I'm using the light version of solarized: http://ethanschoonover.com/solarized I've adapted a copy of it for iterm2 and have a custom vi-mode prompt in zsh that respects it, along with the same mode for irssi. Light backgrounds work better if you work outside from time to time
|
# ? Jun 6, 2013 02:58 |
|
I use the built-in torte scheme because I'm too lazy to find a better one . Also dark background terminals forever This isn't a vim question, but should I start using zsh? I've always just used bash because it's available everywhere in addition to being the default in OSX.
|
# ? Jun 6, 2013 03:36 |
|
I use the Tomorrow Night color scheme just about everywhere I can.
|
# ? Jun 6, 2013 03:50 |
|
I use molokai in mvim. If you want a bunch of colorschemes to explore, I would suggest add flazz/vim-colorschemes with whatever package manager you use.
|
# ? Jun 6, 2013 03:58 |
|
Does anyone actually use elflord, or is it just there as like a self-parody or something?
|
# ? Jun 6, 2013 04:08 |
|
astr0man posted:I use the built-in torte scheme because I'm too lazy to find a better one . Also dark background terminals forever That doesn't sound like a question for this thread, so maybe you should ask in the Linux thread. But if you'd like a quick answer, zsh does have much better autocompletion. Less compatibility with all the funky virtual environment manipulators (i.e. virtualenv, rbenv, etc.), though.
|
# ? Jun 6, 2013 04:29 |
|
Doctor w-rw-rw- posted:That doesn't sound like a question for this thread, so maybe you should ask in the Linux thread. But if you'd like a quick answer, zsh does have much better autocompletion. Less compatibility with all the funky virtual environment manipulators (i.e. virtualenv, rbenv, etc.), though. I can't speak for virtualenv but rbenv works perfectly fine with zsh. They even supply a completions file for it.
|
# ? Jun 6, 2013 04:42 |
|
Civil Twilight posted:I use the Tomorrow Night color scheme just about everywhere I can. Hmm that looks nice. I'm pretty used to earendel now though, but I gotta check yours out.
|
# ? Jun 6, 2013 04:50 |
|
Mentioned in my teeny vimrc post but wombat has served me well as a colorscheme for a while now. Some of these other ones look pretty nice and maybe worth a shot too.
|
# ? Jun 6, 2013 14:38 |
|
I use the railscasts theme. There's a screenshot here, but that looks kind of desaturated or something. I've made a couple changes over the years, stealing a couple things from ir_black, and filling in some gaps.
|
# ? Jun 6, 2013 15:10 |
|
Deus Rex posted:I can't speak for virtualenv but rbenv works perfectly fine with zsh. They even supply a completions file for it.
|
# ? Jun 6, 2013 15:14 |
|
I haven't used non-zsh shells other than to install/switch to zsh in years. zsh on its own isn't that cool, but it allows amazing stuff like oh my ZSH to work, and that is priceless.
|
# ? Jun 6, 2013 21:07 |
|
What kind of text wrapping should I enable for markdown documents? I have the 80 characters cap for code, but it seems like it might be not ideal for a document like an essay. I'm all over the place with nowrap, textwrap, wrapmargin etc..
|
# ? Jun 7, 2013 00:49 |
|
A line per sentence diffs fairly well, and for many audiences you'll want to reword and split up most sentences that don't fit into a non-awkward width line anyway. Probably doesn't work too well for an academic paper or something, though.
|
# ? Jun 7, 2013 03:17 |
|
When I was doing project writeups and stuff in latex I just used wrap and linebreak and wrote it one line per paragraph. A lot of how you want to format things depends on what you're doing with the text and how you plan on distributing it to other people.
|
# ? Jun 7, 2013 04:12 |
|
vap:s/\. /.^M/g vap selects to the end of the paragraph. :s starts a regex search. The regex can be entered as is except for ^M: that one is a literal line break that you can enter by doing Ctrl+v <Enter>. You can then map this to some command to automate it per paragraph. Yay, instant sentence-based paragraph formatting. You could also do it based on text width, but this tends to cascade in diffs. :set tabwidth=78 and then do gqap to format accordingly. It might make for better looking markdown, though.
|
# ? Jun 7, 2013 05:15 |
|
I guess I'll pimp the gitgutter plugin since I've been enjoying it. edit: oh, and here is my crufty vim config: https://github.com/leedo/dot-vim leedo fucked around with this message at 05:49 on Jun 7, 2013 |
# ? Jun 7, 2013 05:44 |
|
DreadCthulhu posted:
The one thing I miss most about IDEs is finding all references to a variable. ctags is great and all, but it only lets you find the declaration given a tag, and not the other way around -- i.e., I have a function named foo, now tell me all places where I call foo(). Is that what ctrlp does? I think a friend had suggested cscope to me in the past, but I never looked into it after I realized it was a separate app. I just found out about cscope_maps.vim, though. Has anyone else used either? Is cscope + cscope_maps the holy grail I've been seeking all along?
|
# ? Jun 7, 2013 12:11 |
|
After not wanting to commit the time to write it myself 5-6 years ago, occasionally I'd look around to see if anyone else had written a Python wrapper that can speak the netbeans protocol that vim speaks. This guy did it, and did a pretty good job of it as well: https://code.google.com/p/vimoir/. You can ignore the main jist of his project, it provides audio-feedback based on vim events - if you know python and you know vim, his netbeans class really is super duper for interfacing directly with vim. The netbeans interface gives you a way to get notifications for events, as well as trigger events and run commands programatically (much more powerful than the embedded python/perl interface - you can do most of what vim is capable of doing without having to actually type stuff in - the origins of the netbeans protocol was an addon or something to the netbeans java IDE so you could use vim inside the editor as a 'native' editor. I dunno. If I remember correctly, you can hook key events to trigger the netbeans event-loop, and there's a 'user has gone idle' event - since vim isn't and won't ever be threaded - thems the breaks. But, better than nothing. In other travels, vim-qt, the project that takes real-vim and embeds it into a qt-window seems to be working. It's kind of interesting because you can write Qt plugins pretty easily so something like a file manager wouldn't be out of the question.. Not that one exists. This guy -> https://github.com/alloy, made a file manager sidebar for MacVim, but it looked janky on my monitor. And finally, a little pro tip on how to hex edit with vim: You can convert your file to hex with: :%!xxd Make your edits.. And then reverse the process with :%!xxd -r Give it a try, becaue gdb is for pussies.
|
# ? Jun 7, 2013 13:55 |
|
facepalmolive posted:The one thing I miss most about IDEs is finding all references to a variable. ctags is great and all, but it only lets you find the declaration given a tag, and not the other way around -- i.e., I have a function named foo, now tell me all places where I call foo().
|
# ? Jun 7, 2013 15:04 |
|
I guess colorschemes are extremely personal. I tried all the ones you guys shared here and I still can't find as good of a match as earendel. I like the mix of not-too-Christmasey colors, not too dark so I can actually see the text, and an overall warm feel to it thanks to the turquoise, the cinnamon browns, the pinks and grass greens for comments. Some of the themes are ridiculous, comments so dark grey that I have to spend 2-3 seconds adjusting my eyes so I can read them. What the christ..
|
# ? Jun 8, 2013 01:49 |
|
I've always been a huge fan of the Molokai color scheme. It's easy on the eyes.
|
# ? Jun 8, 2013 04:54 |
|
When I use eclipse and feel like vim's editing functionality is better than eclipse's, I like to use vrapper. It doesn't embed a gvim window like eclim does, so it tends to be more stable. It is a vim-like keybinding with some specific eclipse commands to better integrate with it.
|
# ? Jun 8, 2013 16:29 |
|
astr0man posted:IDE integration astr0man posted:Recommended Plugins
I have a complete vimrc too. MononcQc posted:Do you ever get to edit a file, delete everything, then start writing new stuff, only to find out, 2 hours later, that you needed something that was in the old version and that you lost it all?
|
# ? Jun 8, 2013 17:52 |
|
DreadCthulhu posted:Some of the themes are ridiculous, comments so dark grey that I have to spend 2-3 seconds adjusting my eyes so I can read them. What the christ.. Have you not tried Zenburn yet?
|
# ? Jun 8, 2013 19:28 |
|
Am I the only one here who's a fan of the built-in desert scheme?
|
# ? Jun 8, 2013 22:55 |
|
Railscasts is just about the only color scheme I use when the option is available these days. Also, coffee is my favorite flavor of ice cream.
|
# ? Jun 8, 2013 23:06 |
|
https://code.google.com/p/vimcolorschemetest is pretty helpful when picking a colour scheme.
|
# ? Jun 9, 2013 00:35 |
|
Cat Plus Plus posted:https://code.google.com/p/vimcolorschemetest is pretty helpful when picking a colour scheme. drat, that's a great resource. Thanks.
|
# ? Jun 9, 2013 00:55 |
|
astr0man posted:In TYOOL 2013 why don't you just use an IDE Perhaps an obvious, but otherwise understated point, is that Vim very much adheres to the Unix philosophy of serving as a tool (among many in the toolbox) to do one thing ridiclously well: editing text. I've been using Vim, nearly exclusively, for all my editing tasks, including code, document preparation, whatever, both professionally and as a hobbyist, for well over a decade now. And there's something really awesome about having a tool that's both very good at editing code/text/whatever, but also being able to do so in nearly every context. In my experience (and perhaps it's somewhat dated), but IDEs are largely "one-trick ponies" with regard to language support. Whereas Vim is pretty awesome at C-family languages, Java, Perl/Python/Ruby, Bourne Shell, Makefiles, R, (La)TeX, various assembly and macro languages, hex editing (with xxd), and one-off DSLs. I can, and do, deal with all of those on a frequent basis, and being able to use the same tool with a familiar and consistent environment in all those contexts contributes to massive productivity. I don't think I'd be nearly as proficient if I had to use 5+ different IDEs as I wouldn't use any one long enough to become sufficiently familiar with it. Then there's also the part where I write nearly all my code in remote screen sessions from multiple machines, but mostly from my underpowered laptop which is perfect for ssh+screen+vim and little else. Recently I've started using Google Docs a bit more for its collaborative features, and while I appreciate the realtime collaborative aspects of it (which, "screen -x" + Vim can do in a pinch too), it can be frustrating. Plus, have you ever tried using a "mouse" on a laptop? It's awful. Anyways, preaching to the choir here ....
|
# ? Jun 9, 2013 14:06 |
|
http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ This is a really nice guide that shows off the cursor movement semantics really well.
|
# ? Jun 9, 2013 18:48 |
|
In case you guys didn't realize, or forgot, 7.3 has relative line numbering. It's really useful for moving around with the movement keys and in visual mode. You don't have to count lines anymore, or move to the closest curly bracket to jump down. Also, using 82gg or 98G to fix errors at a line still works. The relative line numbers are purely visual. Here's a snippet from my .vimrc about relative line numbers. code:
|
# ? Jun 12, 2013 11:38 |
|
|
# ? May 8, 2024 04:28 |
|
I always use relative numbering. Absolute line numbers are not that useful (other than for jumping to, which doesn't need them displayed).
|
# ? Jun 12, 2013 19:01 |