|
MononcQc posted:I'm using the light version of solarized: http://ethanschoonover.com/solarized Thanks for this! Started using it today and it's awesome. Took me forever to get it to play nicely with tmux though I'll try to get the OP up to date with everyone else's stuff soon
|
# ? Jun 12, 2013 22:23 |
|
|
# ? May 8, 2024 06:44 |
|
LaTex Fetish posted:In case you guys didn't realize, or forgot, 7.3 has relative line numbering. gently caress yeah, that's cool and that's going straight in the .vimrc
|
# ? Jun 13, 2013 19:26 |
|
I mentioned YouCompleteMe earlier in the thread as an alternative to clang-complete. I set up a new development machine today and decided to give it a whirl and it's really nice. It provides auto-completion for basically any language and optional semantic completion for various languages provided you have the appropriate tools installed. It also integrates with Syntastic which automatically highlights errors and warnings. Syntastic itself actually seems to work better than Visual Studio's C/C++ intellisense engine in most cases, though it doesn't seem to play nice if you're doing weird things with the C preprocessor.
|
# ? Jun 17, 2013 19:34 |
|
LaTex Fetish posted:In case you guys didn't realize, or forgot, 7.3 has relative line numbering. Argh fine, I'll finally give this a longer try. I was aware of this, but was too lazy to get used to it. Thanks for nudging again. EDIT: actually, this doesn't seem to work if I open a file with gvim and then open another file with ctrl-p. I have to create a new split for that to kick in. Does WinEnter not trigger with ctrl-p? Actually it might be just me with a plugin conflict somewhere overriding relativenumber. I managed to force it to work as intended with au BufNewFile, BufRead * setl , but I feel like this is the nuclear option that I shouldn't be exercising. DreadCthulhu fucked around with this message at 01:03 on Jun 18, 2013 |
# ? Jun 17, 2013 20:38 |
|
You should use BufEnter if you want to do something when you enter a different buffer. WinEnter, as the name implies, only fires when you switch windows.
|
# ? Jun 18, 2013 02:12 |
|
Jabor posted:You should use BufEnter if you want to do something when you enter a different buffer. WinEnter, as the name implies, only fires when you switch windows. That's good, sounds simpler. Thanks!
|
# ? Jun 18, 2013 02:18 |
|
Ah, I rarely ever hide my buffers, or show only one at a time. So, WinEnter/Leave always worked for me. I don't use the gui version, though, so I'm sure that's a part of it all.
|
# ? Jun 18, 2013 03:49 |
|
Solarized owns. Also I just started using Vundle when I set up vim on windows recently, instead of pathogen. Way better, imo. At least removing plugins is alot less of a headache than it can be with pathogen. Also, SuperTab is pretty nice. Best hotkey: * to jump to the next occurrence of the highlighted word. e: Also really a big fan of nerdcommenter and once you get used to the kind of weird way vim-surround works, it's pretty fantastic, especially if you have to do some HTML or something. Tetramin fucked around with this message at 12:03 on Jun 19, 2013 |
# ? Jun 19, 2013 11:57 |
|
Funnehman posted:Best hotkey: * to jump to the next occurrence of the highlighted word. # should be the same but looking backwards instead of forward.
|
# ? Jun 19, 2013 13:03 |
|
Dicky B posted:I mentioned YouCompleteMe earlier in the thread as an alternative to clang-complete. I set up a new development machine today and decided to give it a whirl and it's really nice. It provides auto-completion for basically any language and optional semantic completion for various languages provided you have the appropriate tools installed. It also integrates with Syntastic which automatically highlights errors and warnings. I've been using it for awhile, it's extremely fast. As far as weird C preprocessor things, it will parse a specially formatted file that will set all your compiler switches correctly on a file, which can be auto-generated with a CMake directive. I absolutely love it.
|
# ? Jun 21, 2013 21:24 |
|
Funnehman posted:e: Also really a big fan of nerdcommenter and once you get used to the kind of weird way vim-surround works, it's pretty fantastic, especially if you have to do some HTML or something. Any idea how that compares to our Messiah tpope's vim-commentary? I've been using it very successfully for years, but would love to find out if there's something out there that's 10x better. Unrelated note: is there a popular plugin out there for tidying a buffer in vim? For example, sometime I'll paste some optimized CSS into a buffer and will want to make it readable. Is there a simple and properly working tool for this in vim? DreadCthulhu fucked around with this message at 20:13 on Jun 24, 2013 |
# ? Jun 24, 2013 20:08 |
|
tcomment.vim is my commenting plugin of choice. I used NERDCommenter for about a year before its lack of support for vim motions really got to me
|
# ? Jun 24, 2013 20:39 |
|
DreadCthulhu posted:is there a popular plugin out there for tidying a buffer in vim? For example, sometime I'll paste some optimized CSS into a buffer and will want to make it readable. Is there a simple and properly working tool for this in vim? As far as "unoptimizing" CSS, check out the five sed commands at the bottom of http://mabblog.com/source/shell/unCompress.bash. They do a pretty good job of it, and are a good springboard if you want to implement the functionality in vim.
|
# ? Jun 24, 2013 20:55 |
|
DreadCthulhu posted:Any idea how that compares to our Messiah tpope's vim-commentary? I've been using it very successfully for years, but would love to find out if there's something out there that's 10x better. If it's good enough for tpope it should be good enough for you
|
# ? Jun 24, 2013 21:30 |
|
The Laplace Demon posted:As far as "unoptimizing" CSS, check out the five sed commands at the bottom of http://mabblog.com/source/shell/unCompress.bash. They do a pretty good job of it, and are a good springboard if you want to implement the functionality in vim. if you have it installed already, you could also use the scss command line tool. on the whole buffer: code:
code:
|
# ? Jun 24, 2013 21:44 |
|
Since I use tmux and often have 6+ panes I don't like line numbers cluttering the pane. For that reason I make them easy to toggle: " Toggle showing line numbers with \l :nmap \l :setlocal number!<CR> Also: I installed and powerline using pathogen. How do I get powerline to show? NERDTree works, but how do I make a new (shorter) ex command to open it? it's effectively just another window, right?
|
# ? Jun 27, 2013 23:24 |
|
I often use g, to jump back to the last edit point, but this doesn't work across buffers. Does anyone know if there is a way to make it work across buffers?
|
# ? Jul 2, 2013 10:54 |
|
Dicky B posted:I often use g, to jump back to the last edit point, but this doesn't work across buffers. Does anyone know if there is a way to make it work across buffers? I always use `. to jump back to last edit point, and that seems to work in every buffer I have open.
|
# ? Jul 2, 2013 16:31 |
|
That does exactly the same as g, for me, and is still buffer-local :/ This seems to be the case with a completely bare .vimrc. Do you have anything in your config which changes this behaviour?
|
# ? Jul 2, 2013 17:05 |
|
Dicky B posted:That does exactly the same as g, for me, and is still buffer-local :/ Maybe I don't understand what you want to have happen then. Do you mean "jump to where I last edited in a buffer that I switched to" ( which is what I thought you meant) or "I edited buffer X, I switched over to buffers A,B, and C to look at stuff, and now I want a command to jump back to whatever buffer I last changed, at the point I changed it".
|
# ? Jul 3, 2013 13:43 |
|
The latter. There doesn't seem to be any way to just switch to the last edited buffer either. I assume it's possible to implement this through vimscript though.
|
# ? Jul 3, 2013 14:41 |
|
Dicky B posted:The latter. There doesn't seem to be any way to just switch to the last edited buffer either. I assume it's possible to implement this through vimscript though. Ctrl+o jumps back, including across buffers
|
# ? Jul 3, 2013 14:49 |
|
sm00th posted:Ctrl+o jumps back, including across buffers
|
# ? Jul 3, 2013 15:01 |
|
Dicky B posted:For my purposes this works fine. Thanks! There is also BufSurf: http://github.com/ton/vim-bufsurf which allows you to go back through edit history. There are also lots of other ways to cycle through buffers, many of which I did not know until you asked your question and I read this page: http://vim.wikia.com/wiki/Easier_buffer_switching vim wiki posted:Often the buffer that you want to edit is the buffer that you have just left. Vim provides a couple of convenient commands to switch back to the previous buffer. These are <C-^> (or <C-6>) and :b#.
|
# ? Jul 3, 2013 15:07 |
|
BufSurf is based on viewing history, not edit history. If there's a way to switch to the last modified buffer then it would be trivial to set up a mapping to do what I want but this doesn't appear to be a core feature. Fortunately Ctrl-o is good enough for my particular needs.
|
# ? Jul 3, 2013 15:42 |
|
Just stumbled upon the native option to turn on column and line highlighting. It's super obnoxious, I'm finally in full Christmas tree mode.
|
# ? Jul 19, 2013 03:05 |
|
DreadCthulhu posted:Just stumbled upon the native option to turn on column and line highlighting. It's super obnoxious, I'm finally in full Christmas tree mode. I've mapped <leader>r to toggling rainbow parens, because while it is certainly useful, god drat it's garish.
|
# ? Jul 19, 2013 03:31 |
|
DreadCthulhu posted:Just stumbled upon the native option to turn on column and line highlighting. It's super obnoxious, I'm finally in full Christmas tree mode. Whoa. I want cursor line highlighting, but it doesn't work with solarized. How do I set it? Searching around I guess i need to set cursorline as well as g:solarized_hitrail. It uses some regexto only highlight after the cursor, though. Regardless, I see nothing when both are set. What gives? EDIT: Actually nevermind. It does work, but instead of setting the background, it changes the colour of some of the syntax, so in a normal text file it's useless. Tiger.Bomb fucked around with this message at 18:39 on Jul 19, 2013 |
# ? Jul 19, 2013 18:35 |
|
Anybody here got experience with writing syntax highlighting rules in vim? Do you know if when you use the "region" rule, whatever is matched by start= can no longer be highlighted by the rest of the rules, especially if you use hs=e? I'm probably brainfarting super hard here, but say I have:code:
code:
The second and third regex do the highlighting successfully, BUT then defn loses its original special keyword syntax highlighting which was there before, thus not really doing its job. Is there a way to make both happen or am I stuck?
|
# ? Jul 21, 2013 09:13 |
|
Is there a way to make UltiSnips and YouCompleteMe share a Tab binding, such that it will expand or proceed through a snippet if applicable and through completions otherwise? It seems like binding UltiSnips expand key to <Tab> prevents it from passing through to YCM.
|
# ? Aug 2, 2013 18:24 |
|
YCM has ultisnips integration, read the docs.
|
# ? Aug 2, 2013 22:18 |
|
SavageMessiah posted:YCM has ultisnips integration, read the docs. The only integration YCM provides is autocompleting the snippet's shortcut. You still need to press a key to expand it, and the author's suggestion is remapping UltiSnips to something that doesn't conflict in order to do so. I'd like them both to share a context-sensitive key, which I think should be possible with a function in VimScript.
|
# ? Aug 3, 2013 00:55 |
|
xtal posted:The only integration YCM provides is autocompleting the snippet's shortcut. You still need to press a key to expand it, and the author's suggestion is remapping UltiSnips to something that doesn't conflict in order to do so. I'd like them both to share a context-sensitive key, which I think should be possible with a function in VimScript. Gotcha. I was just messing with YCM a few days ago, I guess it is I who should read the docs. I ended up not using it because it doesn't play nicely with clojure.
|
# ? Aug 3, 2013 16:57 |
|
SavageMessiah posted:Gotcha. I was just messing with YCM a few days ago, I guess it is I who should read the docs. I ended up not using it because it doesn't play nicely with clojure. Yeah, luckily neocomplete is very nice and just as performant, with functioning integration with neosnippet. I like YCM's Jedi integration, though, so I'm still looking for a solution! xtal fucked around with this message at 04:48 on Aug 5, 2013 |
# ? Aug 3, 2013 19:44 |
|
I'm running gVim on XP, but the memory utilization is through the roof, and it has a tendency to freeze/crash even where heavier editors like Sublime and Eclipse don't have similar issues. There's also something weird going on with fonts, wherein they appear blurry, distorted, and in general, poorly rendered, even when other programs render this font well. Two questions: 1. Has anyone experienced these issues? Is there a known fix? 2. Is running Vim in cmd.exe a viable solution? I know it can be done, but is it a hassle? I'd post my _vimrc but I'm not at work right now, and my home installation is very different and exhibits none of the same symptoms.
|
# ? Aug 4, 2013 22:10 |
|
O Tempora! O Mores! posted:I'm running gVim on XP, but the memory utilization is through the roof, and it has a tendency to freeze/crash even where heavier editors like Sublime and Eclipse don't have similar issues. There's also something weird going on with fonts, wherein they appear blurry, distorted, and in general, poorly rendered, even when other programs render this font well. Two questions: vim in cmd isn't particularly bad. The only real bummer is how you have to go through the menus to resize the cmd window itself. Try renaming your _vimrc (to revert to default rules) first to see if this changes any of the behaviour.
|
# ? Aug 4, 2013 22:28 |
|
For posterity, I fixed YCM/UltiSnips by installing SuperTab (which itself has UltiSnips integration) and setting it to trigger <C-Tab>, which I've remapped YCM to. Essentially, pressing tab either activates UltiSnips or passes the event to SuperTab, which emulates YCM's mapping. Works like a charm.
|
# ? Aug 7, 2013 01:00 |
|
Can anyone explain this command to me? I know what the result is but I don't know what it's actually doing because all I did was modify a different thing. It finds all instances of <p> and gives them an id attribute with sequential numbers.code:
let n=1 -- Simple enough, it's defining a variable. g/<p>/ -- From what I can tell, this searches for the pattern and collates all lines that match into a new buffer of sorts which is kind of like a more/less thing? s/<p>/ -- Search for this pattern. \='<p id="'.n.'">'/ -- I get that this is the replacement part of the s command and I can see the different parts of it but it starts with an escaped equals sign, has quotes surrounding it and the variable part and some periods around the variable too? let n=n+1 -- Increasing the variable by 1. If this command is being run over and over I don't see why this part is repeated to increase the variable but let n=1 isn't repeated. If it's all repeated then n would be set to 1 at the start, the replacement would be carried out with n as 1, it would be set to n+1 (2) but then set back to 1 again? This clearly isn't the case.
|
# ? Aug 11, 2013 14:35 |
|
I'm not an expert (hell, I've never even used vimscript for anything) so this is completely just spitballing. But this part:ArcticZombie posted:\='<p id="'.n.'">'/ -- I get that this is the replacement part of the s command and I can see the different parts of it but it starts with an escaped equals sign, has quotes surrounding it and the variable part and some periods around the variable too? Looks like it's doing string concatenation to me ( <p id -", the variable n, and "> joined by the . operator). The escaped equals sign looks like it tells Vim to not literally replace <p> with '<p id="'.n.'">' (Take a look here). edit: Removed a misunderstanding on my part. jony neuemonic fucked around with this message at 18:06 on Aug 11, 2013 |
# ? Aug 11, 2013 15:07 |
|
|
# ? May 8, 2024 06:44 |
|
e: I tried to explain that but it was dumb so I'm removing it.
|
# ? Aug 11, 2013 15:46 |