15 ms·
Vim After 11 Years
- jrogers65 14y ago> Emacs has a useful mode which highlights hexidecimal colors in CSS and SASS with the color represented by the text. http://www.vim.org/scripts/script.php?script_id=2937 http://www.vim.org/scripts/script.php?script_id=2937 > The biggest hole, however, is the lack of refactoring and smart completion. http://eclim.org/ http://eclim.org/
- pekk 14y agoFor Python, there is a choice of the jedi library or the rope library to do refactoring and smart completion. This in addition to ctags and the like. I imagine other languages have similar things.
- luckystarr 14y agoJedi is pretty good actually. Initially it would sometimes be slow and mess up buffers, but that didn't happen for a long time.
- reyan 14y ago> http://www.vim.org/scripts/script.php?script_id=2937 http://www.vim.org/scripts/script.php?script_id=2937 This one doesn't need gVim, with rgb() and rgba() support https://github.com/ap/vim-css-color https://github.com/ap/vim-css-color
- recuter 14y agoIs there a nice sublime plugin for this perhaps? A very excellent idea.
- rplnt 14y agoLiveCSS.
- statico 14y agoThanks for the CSS script link!
- yurifury 14y agoI would suggest using the https://github.com/ap/vim-css-color https://github.com/ap/vim-css-color instead.
- zhxgigi 14y agoSmart completion is fine to me, but the refactoring is a potential problems. It seems there isn't an open source refactoring tools as good as PyCharm for python.
- deleted 14y ago[deleted]
- johncoltrane 14y agonetrw comes by default. No need to install NERDTree.
- edanm 14y agoAnd yet, almost everyone does.
- johncoltrane 14y agoThanks to the hundreds of blog posts that tell them to do so.
- fournm 14y agoPretty much--I actually had no idea netrw existed since everyone always just points to NERDTree.
- benmills 14y agoI've recently uninstalled NERDTree in favor of netrw and I've been presently surprised at how little I miss NERDTree and how much more productive I am on default vim installations.
- slurgfest 14y agoWas NERDTree making you unproductive? How?
- williamdix 14y agoIt's not that NERDTree makes one unproductive. It's that using NetRW on default vim installations allows you to get going without installing NERDTree.
- danneu 14y agoI used NERDTree when I was starting Vim, but uninstalling and hating it were essential steps towards Vim nirvana. Because then I found out about ctrlp.vim and :E, two things that makes NERDTree completely useless to me.
- puls 14y agoWhy do people keep suggesting iTerm2? The built-in terminal app on the Mac does Unicode and 256 colors just fine.
- niggler 14y agoHistorical. Terminal has improved greatly since Leopard/SL
- deleted 14y ago[deleted]
- Xion 14y agoiTerm2 has few other fancy features, like horizontal and vertical splitting or Guake-like top-down terminal [0]. [0] http://ivanvillareal.com/osx/setup-iterm2-to-behave-like-guake/ http://ivanvillareal.com/osx/setup-iterm2-to-behave-like-gua...
- niggler 14y agoI've used visor/simbl in leopard and snow leopard for years to get the top-down effect in terminal: http://visor.binaryage.com/ http://visor.binaryage.com/
- haar 14y agoMulti-pane input via cmd-shift-i, and saved pane/window configurations through cmd-shift-s and cmd-shift-r also come in handy.
- baghali 14y agoI personally enjoy being able to split panes vertically with iTerm2
- statico 14y agoIndeed. iTerm2 has replaced tmux for me for local development.
- niggler 14y agoPG is there a way to have HN present the subdomain for github submissions?
- HorizonXP 14y agoYes, this has been a bit of annoyance for me too.
- julian37 14y agoI'm using http://userscripts.org/scripts/review/121512 http://userscripts.org/scripts/review/121512, works very well.
- niggler 14y agoDoesn't work in chrome :/ "Apps, extensions, and user scripts cannot be added from this website"
- roryokane 14y agoYou can make it work in Chrome; there’s a way around the warning. Instructions are in “Steps on adding extensions from other websites” on the Chrome help page linked from that warning: http://support.google.com/chrome_webstore/bin/answer.py?hl=en&answer=2664769&p=crx_warning http://support.google.com/chrome_webstore/bin/answer.py?hl=e.... In short, to add the user script, open Tools > Extensions, then drag and drop your downloaded 121512.user.js file into the Extensions tab.
- scott_s 14y agoI use MacVim for editing files locally on my Mac: http://code.google.com/p/macvim/ http://code.google.com/p/macvim/
- papsosouid 14y agoI use nvi, and have tried to switch to vim a dozen or so times over the years. But there are so many irritating little quirks and misfeatures and annoyances that I can never manage to fix. Does anyone know of a guide to getting a sane, non-broken vim working with some basic plugins like syntastic? Last time I tried I couldn't bind F-keys for some reason, I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time, I couldn't get auto-complete mapped to tab properly, and a few other things I can't remember now. I eventually gave up again as the extra functionality of vim ends up being counter-productive when none of it works right.
- slurgfest 14y agoIt sounds like you want vim features. But vi compatibility mode is probably not consistent with these. Mapping f-keys should work fine in a GUI vim, but in a terminal F-keys may depend on configuring the terminal. You don't have to use syntastic if it doesn't work right for you, you can just use individual checker plugins or set makeprg and use :make. Mapping auto-complete to tab depends on not having multiple plugins fighting over the key. Most of this is a matter of particular plugins, not vim itself.
- papsosouid 14y agoRight, I want some of the vim features, mainly plugins. I don't enable vi compatibility, it isn't even remotely vi compatible and it just breaks stuff. I want syntastic, that's the primary motivation for trying to get vim working. I just want it to be helpful instead of irritating. No plugins are messing with tab, I am just trying to get it to work using a normal mapping.
- cleverjake 14y ago>> Does anyone know of a guide to getting a sane, non-broken vim working with some basic plugins like syntastic There are a number of vim-setups that are popular. janus (https://github.com/carlhuda/janus https://github.com/carlhuda/janus), spf13 (https://github.com/spf13/spf13-vim https://github.com/spf13/spf13-vim) are pretty popular ones. >>Last time I tried I couldn't bind F-keys for some reason F keys bind fine for me, using OS X Terminal, and gnome-shell in linux. Are you using an esoteric term? >> I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time That is using the SignColumn part of vim. As far as I know, vim doesn't allow you to force the existance of SignColumn. You can open up a bug report at their Google Code repo if you think its worthwhile >> I couldn't get auto-complete mapped to tab properly Depending on your language, YouCompleteMe (https://github.com/Valloric/YouCompleteMe https://github.com/Valloric/YouCompleteMe) is amazing, but if you don't do C based stuff NeoComplCache is great too (http://www.vim.org/scripts/script.php?script_id=2620 http://www.vim.org/scripts/script.php?script_id=2620) >> the extra functionality of vim ends up being counter-productive when none of it works right To be fair, thats true of any tool.
- brown9-2 14y agoOne of Vim’s strengths is that it starts lightning fast, so starting Vim from the terminal is trivial. With a modern, 256-color terminal like iTerm2 or Gnome Terminal, it will even look like gVim. But the best part is that you can drop into the command line at any time with Ctrl-Z, which suspends Vim, and your working directory is where you left off. Is there any reason to do this instead of !sh within Vim to drop into a shell?
- dhimes 14y agoIIRC, !sh starts a new shell- so it depends on your context I suppose.
- brown9-2 14y agoI think this is the explanation, I usually only find myself wanting to temporarily "stop" Vim and do something on the shell for quick one-off commands that are fine in a subshell - not to keep a backgrounded Vim instance around for longer than that. The blog author seems to have a different use in mind.
- deleted 14y ago[deleted]
- statico 14y agoThat's pretty much it. See above comments regarding context.
- niggler 14y agoYou end up creating a new session each time when you do !sh. backgrounding Vim lets you use the same shell instance. The other issue I have in general with the ! form is that some applications mess up osx vim. For example, try dropping into a node session (!node) and then quitting.
- slurgfest 14y agohave your terminal map Ctrl-Z to fg, and you can cycle in and out of the shell almost instantly from vim with that key.
- fatbird 14y agoEvery time I read an article like this, it's how a power user installs an array of plugins and customizations to really soup up Vim, which to me kind of misses the point. If you want that level whiz-bang, use Coda or Sublime Text 2 or Eclipse or whatever. I don't recall where I saw this, but someone advised disabling syntax coloring in your editor to remove a crutch (and, secondarily, to visually simplify your environment). I've tried this with Vim and it's surprisingly nice [0]. You have to read the code more closely, and think more carefully about what's on screen, and this has the effect of focussing me more. Simplifying my environment, making it more sparse, but always having the power of Vim available, makes for a really potent, semi-distraction-free environment. [0] Well, mostly. I leave it on in order to have three colors used: a good contrast color for code, a second contrast color for strings, and a third, very low-contrast color for comments and line numbers so that, if I want to see those things, I can look for/at them, but if I don't, they're easy to ignore. Likewise, visually distinguishing between strings and code continues to be really useful.
- yepguy 14y agoHow did you configure vim to use only three colors? Did you create your own colorscheme or is there another way to do it?
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- slurgfest 14y agoCustomizing your editor to do what you want doesn't miss the point. It is the point. If my editor does exactly what I want, I have no need of Coda or Sublime Text 2 or Eclipse or whatever. You can turn off colors. That's your customization because you like it. Good. Other people want other customizations.
- pr0zac 14y agoA lot of us do development on remote servers. Using vim in a terminal on the server is a heck of a lot snappier than a local editor over a remote connection. Also makes reconnecting your dev environment as easy as tmux a -d and allows me to do so from multiple machines.
- derwiki 14y agoThe author mentioned CtrlP for fuzzy filename matching. Its great because it's in pure Vimscript, but in my experience it becomes unusably slow for moderately sized projects. A month or two ago, I switched back to CommandT (requires Vim to be compiled with Ruby support, engine written in C) and haven't thought twice about it since then.
- oacgnol 14y agoI've been meaning to try out matcher[0] for usage with CtrlP, I'm not sure how well it works but it's written in C and is purported to speed up search. Not sure if it's still being maintained, however... [0] https://github.com/burke/matcher https://github.com/burke/matcher
- burke 14y agoThere's not much to maintain. I ported the matcher from Command-T out of its ruby-C wrapper, and it more or less just works. I use it dozens or hundreds of times a day.
- swift 14y agoIt works quite well. The only negative I've found is that using matcher seems to disable CtrlP's usual highlighting of which letters in a search result are matched. In the end, though, I went back to Command-T.
- statico 14y agoHow large is "moderately sized" ?
- deleted 14y ago[deleted]
- bti 14y agoI use CommandT primarily on my main machine but I also have CtrlP installed and they are both mapped to the same key (<leader>f) in a conditional. If I'm on a machine that has Vim compiled with Ruby, I get CommandT, otherwise CtrlP. Best of both worlds.
- h2s 14y agoLots of people seem to declare ; or , to be useless keys and remap them. They're two of my most used movement keys in certain circumstances. I used to have , remapped to <leader> but switched back when I realised what I was missing out on. I'd advise anybody else to reconsider if they've made the same mistake I did.
- danneu 14y agoI've had ; mapped to : forever. Is there a use for `;` I'm missing out on? `;` just seems to be for stuff like "`fp` -- Oh wait, I didn't see all the p's between my cursor and the p I wanted. ; ; ; ;." Now I use easymotion.vim which obviates that scenario.
- goldfeld 14y agoI created vim-seek exactly for this reason, it's like f but takes always two characters, way faster than easymotion within the line (though I still use easymotion for longer distances) http://github.com/goldfeld/vim-seek http://github.com/goldfeld/vim-seek
- danneu 14y agoCool! Until I found easymotion.vim, I was sort of doing a poor man's vim-seek with `/` and two chars.
- mats_rauhala 14y agoFor me it's often fp <something> ;. ;. ;. ;. For example if I have a longer line I would like I could do something like f,a<cr><esc>k,.k,.k,.k,.k,.k,.
- dakr 14y agog; will move the cursor to the line of your last edit (and further through your edit history). I find it useful as a move command but also use it to remind myself of what and where my last edit was.
- dwb 14y ago
- zokier 14y agoI'm not sure why the author advocates job control (ie ctrl-z/fg/bg) instead of using tmux/screen. A multiplexer offers far more flexibility, and most importantly does not lose state even if your session ends (eg ssh connection drops).
- thevdude 14y agonohup master race. Just kidding, tmux for life.
- pekk 14y agoWhile that's true, clipboard interaction through tmux is awful.
- saurabh 14y agohttp://grota.github.com/blog/2012/05/08/tmux-clipboard-integration/ http://grota.github.com/blog/2012/05/08/tmux-clipboard-integ...
- deleted 14y ago[deleted]
- statico 14y agoI didn't mean for them to come across as mutually exclusive. The ^Z/fg approach is great for keeping context: Go to a directory, run something, edit something, suspend editing to run something else, resume editing, finish back at the command prompt. With tmux I'd need to create a new pane, navigate to the same directory, and reinitialize any environment stuff like virtualenv. Use both! :)
- Aardwolf 14y agoCan vim do the following? I'm editing some project with 10000 C++ files. There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/". Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path. IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and there you are in that file. Another thing: Some IDE's and editors have this feature where if you change lines, it marks it with some color on the left, as well as colors in the scrollbar, to immediately see which parts of the file were changed compared to git and/or the last time you opened it. Can Vim do this? Thanks!
- shuzchen 14y agore: git changes, after seeing such a plugin for sublime (https://github.com/jisaacks/GitGutter https://github.com/jisaacks/GitGutter) I went ahead and implemented the same thing for Vim (https://bitbucket.org/sirpengi/iwilldiffer https://bitbucket.org/sirpengi/iwilldiffer). The plugin is still in beta status yet with compatibility, and I should make it easier to install with the various plugin managers as well as make the feature async (right now, the UI blocks waiting on the diff command). But otherwise, I'm using it daily and it supports mercurial as well as git.
- SeoxyS 14y agoThe CtrlP plugin will make opening these files a breeze. If you just trigger it and type palette.cpp, it should be the first match.
- tomsthumb 14y agowith your cursor on a filename that is a legitimate relative path, you can just press 'gf' to open the file from command mode. there is also a mirrored command of '^xf' in insert mode. slightly different work flow... ^o and ^i get used a lot in conjunction with 'gf', and are also pretty handy in general.
- Symmetry 14y agoBetter, you can type palete.cpp and it should still be the first match.
- yaj 14y agoI can live without Vim but cannot without Vim mode. All apps I have used since learning Vim has some kind of Vim bindings - Visual Studio, Eclipse, PyCharm and ST2. I also rely on browser vim plugins (vimium, vimperator). It seems Vim mode is becoming ubiquitous in my apps.
- SeoxyS 14y agoMy single greatest tip to make vim even more amazing is to run it in a tmux session: It makes it super easy to split panes and create new windows for related things you need to do (git stuff, compilation, running tests, running a REPL, etc.)
- gnosis 14y agoYou can easily split panes (called windows in vim) within vim. You can also create new tabs within vim for related things you need to do. I still use tmux or screen to do other things which aren't convenient or elegant to do within vim, but splitting windows and creating tabs can be done just fine within vim itself (or, in my case, within gvim, which I prefer due to the increased color gamut and keybinding abilities over terminal vim).
- SeoxyS 14y agoWhen I said split panes in tmux, I meant to put shells, repls, or servers. I also use split panes and tabs within vim for extra buffers.
- q_revert 14y agoyou should take a look at https://github.com/jpalardy/vim-slime https://github.com/jpalardy/vim-slime , very handy for sending code from vim sessions to other tmux panes
- gfodor 14y agoHis/her point is to use tmux for splitting the editor and terminal windows, because vim sucks at subshells.
- zem 14y agoi use terminator for that. works wonderfully. http://www.tenshu.net/p/terminator.html http://www.tenshu.net/p/terminator.html
- grn 14y agoPersonally I have a mapping <leader>x that starts a terminal emulator when running under X or drops to the shell otherwise. When I work on a project I cd into its directory. Executing commands is just a matter of hitting <leader>x, doing what's necessary, and closing the terminal.
- gfodor 14y agoSome small vim tweaks I've recently been using myself that I find very nice: nmap <CR> :write<CR> cabbrev w nope Re-map enter to save the file. If you try to do a :w it will yell at you until you take out the cabbrev so you can retrain your muscle memory. Took me about a day to retrain. let g:EasyMotion_leader_key = ';' nmap s ;w nmap S ;b Remap s and S to be easymotion forward and backward. I never use s, since it's largely a redundant command, and didn't like having to do a two key command for easymotion. (You can set the leader key to whatever here, the nmap's are the important part.) noremap <C-H> <C-W>h noremap <C-L> <C-W>l noremap <C-J> <C-W>j noremap <C-K> <C-W>k Move between panes with motion keys with control held down. Also the YouCompleteMe plugin got some HN airtime but it really needs to get more. It's amazing. http://valloric.github.com/YouCompleteMe/ http://valloric.github.com/YouCompleteMe/ And as others have mentioned using vim inside of tmux is very nice. It's especially helpful to remap the entire tmux keymap to be vim-like. Also, does anyone have any suggestions for what to re-map Space to? I am amazed Enter and Space in command mode both do relatively useless things. Remapping space to page down is OK but I use ctrl-f/b which is just as fast imho.
- jlgreco 14y agoI have space mapped to execute the macro in 'q': noremap <Space> @q This lets me set a macro by first wacking qq, then q to finish, and then replay it by wacking space. I find myself using quick throw-away macros that only have a use for maybe 10 seconds far more often with this setup. (Plus wailing on the spacebar to get work done can be really satisfying ;)
- 14y ago
- kunai 14y ago> With a modern, 256-color terminal like iTerm2 or Gnome Terminal, it will even look like gVim Uh, I use xterm... It's obsolete, I know, but it's still the fastest.
- codygman 14y agorxvt-unicode? st?
- dysoco 14y agoFastest? Like I'd realize the speed difference between xterm, urxvt or even Gnome Terminal.
- kunai 14y agoTrust me, when you have really crappy hardware (Intel Atom 1.3GHz w/ 512MB mem), you will notice the difference. Execution of commands that takes 2-3 seconds on Gnome Terminal will be nearly instant on xterm.
- jlgreco 14y agoXterm will do 256-colors too. It's the setup I use.
- Aissen 14y agoAlso, Terminology. Faster than xterm or rxvt.
- addlepate 14y agoMadness, I say. Graphical editors are so much nicer than this.
- enoch_r 14y agoI recently switched to Vundle from Pathogen and it is a joy to use. Best part: you can bootstrap[1] Vundle from your .vimrc, turning the two-part "vimrc & plugins" configuration into a one-part "vimrc" configuration. https://github.com/gmarik/vundle/blob/master/test/vimrc https://github.com/gmarik/vundle/blob/master/test/vimrc
- bti 14y agoThanks! This was always a pain, figured there must be an easy way to setup a fresh dotfile pull.
- johncoltrane 14y agoNo you can't, you still need to have vundle installed.
- enoch_r 14y agoNope, I've done it quite a few times--you can bootstrap it from your vimrc like so: if !isdirectory(expand(root, 1).'/vundle') exec '!git clone '.src.' '.shellescape(root, 1).'/vundle' endif
- johncoltrane 14y agoThanks.
- docwhat 14y agoI have a similar, yet different approach. My approach also works even if git doesn't exist (by skipping vundler). I need this since sometimes I work on systems that don't have every bell-and-whistle I could want. https://github.com/docwhat/homedir-vim/blob/master/vimrc/.vimrc https://github.com/docwhat/homedir-vim/blob/master/vimrc/.vi...
- snarfy 14y agoMy new favorite toy: http://gh.codehum.com/nosami/Omnisharp/ http://gh.codehum.com/nosami/Omnisharp/ It's 'real' intellisense for Vim/C#. It's fairly new and rough around the edges, but works great once you get it going.
- platz 14y agoThanks for this!
- anonymousDan 14y agoI'd love something like this for java...
- sfvermeulen 14y agoI've been looking for something like this for months. I've also never heard of easymotion or YouCompleteMe. How is it that I've been out of the loop for all these things ??
- Bjartr 14y agoMinor nitpick, but can any terminals do squiggly underlines or is that still a gVim only feature?
- kunai 14y agoSquiggly underlines? What, do you mean: 1 class Hello ~ ~ ~ ~ ~ --INSERT-- Like that? Of course; heck, even xterm does that fine. If you were referring to something else, I'm not too sure... EDIT: Never mind, now I know what you're talking about. No, I don't think you can get those in terminal vim, but I'm pretty sure there is a plugin for it.
- swift 14y agoiTerm2, at least, can show underlines where you'd expect squiggly lines in GUI vim. It's not as nice as the squigglies but it's pretty functional in practice.
- jason_slack 14y agoWow. I wish I had this exact setup. I have never been good at configuring Vim and the SPF-13 VIM distro is wonky. Would save me from buying Sublime
- slurgfest 14y agoTry using Vundle to add one plugin at a time!
- jason_slack 14y agoGood idea. Thanks for the idea.
- ichinaski 14y agoMy favourite ones: " Make Y behave like other capitals nnoremap Y y$ " Reselect visual block after indent/outdent vnoremap < <gv vnoremap > >gv
- tomlu 14y agoCurious - what's the point of retaining the selection after indenting?
- jdonaldson 14y agoSometimes you want to indent more than once. This remap is fine, but the idiomatic way to do this is just to use a period to repeat the last command. It doesn't hurt to get used to that.
- delambo 14y agoRecently, I made the switch to vim from Sublime Text and I have installed some of the same tools. So far, I've committed to vim, but I have found that the plugins for file searching, linting, etc. are easier to use, more intuitive, and less painful to setup in Sublime Text.
- mihaifm 14y agoInstead of NERDTree you might want to try Vimpanel, it's based on NERDTree but much more evolved, and instead of using :bprev/:bnext you might want to try Bufstop, it uses history instead of the buffer list to get you to the previous buffer. I made these to get around some limitations for some plugins that everyone seems to suggest. https://github.com/mihaifm/vimpanel https://github.com/mihaifm/vimpanel https://github.com/mihaifm/bufstop https://github.com/mihaifm/bufstop
- welder 14y agoMy vimrc file with step-by-step instructions for installation: https://github.com/alanhamlett/Alan-vimrc https://github.com/alanhamlett/Alan-vimrc Some features in my vimrc file: * Code folding for bracket or indention based languages * Edit multiple files in tabs using minibufexpl plugin * Using the Solarized color scheme * Using Vundle for plugin management (apt-get for Vim plugins) * Common swp, backup, & view directories (No more ~ files left around) * Useful defaults (spaces instead of tabs, remove trailing newlines, etc.)
- jagguli 14y agoHas top level windows been implemented yet. It's been on the todo for a long time so has a lot other new feature requests.
- jagguli 14y agoBasically can you create one vim server and make multiple connections to it, sharing the same session and buffers. Like how emacsclient works.
- lightblade 14y agoHere are my 2 cents set undofile " This creates a undo file that persists your undo history when the file gets closed imap >> <ESC> " Double right arrow to escape from insertion mode. This is faster and more comfortable (at least for me) than to reach for tab key for some people set clipboard=unnamed " This is bridges between your Vim yanks and your system clipboard
- grn 14y agoundofile sounds great! I didn't know about it. Some people use jj to go to the normal mode. Personally I remapped Caps Lock to Escape in my whole system, so I can go to normal mode easily. You can yank to the system clipboard by providing appropriate register to yank into. You do that by pressing "* before the yank command (e.g. "*yy to yank the current line).
- docwhat 14y agoI have some code to keep the undo/backup/swaps in a sane place... http://stackoverflow.com/questions/4331776/change-vim-swap-backup-undo-file-name/9528322#9528322 http://stackoverflow.com/questions/4331776/change-vim-swap-b...
- mathnode 14y agoIn Star Trek the next generation; as different users interacted with different physical platforms (tablets, desk consoles, wall panels, tablets, voice activated devices, "desktops", etc), the work space would adapt to it's physical medium....so....I'm sold!
- grn 14y agoI can recommend CtrlP (or Command-T). I can't imagine navigating in a project without them. They also have great buffer navigation. Personally I mapped <leader>t to CtrlP file search, and <leader>b to CtrlP buffer search (:CtrlPBuffer).
- dreamdu5t 14y agoNo Command-T!? FAIL.
- Syssiphus 14y agoThat's what CtrlP is for.
- kidambisrinivas 14y agoDoes any vim plugin support context sensitive auto-complete like Visual Studio (auto-complete only with variables that are alive in the current block of code)? I code in perl and am currently using ctags for autocomplete, but it doesnt autocomplete based on the context.
- docwhat 14y agoMy .vimrc does this. I haven't used it much in perl (mainly bash, ruby, and python) but it should work fine. https://github.com/docwhat/homedir-vim/blob/master/vimrc/.vimrc https://github.com/docwhat/homedir-vim/blob/master/vimrc/.vi... The important bits are vim's built-in omnicomplete and neocachecompl Omnicomplete by itself isn't bad. I haven't seen any excellent documentation explaining how it all works, but even without my .vimrc I use C-X-f a lot to complete filenames. Ciao!
- mats_rauhala 14y agoAm I the only who tries not to override default commands? It's not like I use them all, but I might learn it at some point, and I want to have them available.
- tomlu 14y agoAs a rule of thumb you are right, but in the particular case of s, S I think it's OK. They are pretty darn redundant.
- pseut 14y agoI'm disappointed no one's mentioned digraphs yet. I've used emacs for years, but I'm starting to use vim now because ctrl-k G* etc is just so easy (I type a lot of math).
- oddthink 14y agoIf that's your only reason, stick with emacs but use evil-mode. I flip-flop between liking evil-mode (when I'm mostly just editing stuff) and preferring standard emacs keybindings (when I'm switching a lot between shells, dired, interactive sessions, etc.)
- fghh45sdfhr3 14y agoWith other people's code I prefer to use something like http://astyle.sourceforge.net/ http://astyle.sourceforge.net/ on the command line.
- EdIsSuperior 14y agoAs I am sure you are aware, Ed is the standard text editor.
- moron4hire 14y agoOne of the things that I really love about Vim is that it's the same on every platform, including Windows. Hell, it's the same on my Android device.