Posts

Showing posts with the label vim

Weird Vim configuration on Ubuntu Bash for Windows

Weird Vim configuration on Ubuntu Bash for Windows First screenshot Second Screnshot I am using Ubuntu Bash for Windows and installed the ultimate vimrc from https://github.com/amix/vimrc However, now I get this weird highlighting over my code in vim. Any suggestions on how to get rid of it? set t_Co=256 may fix the problem with the background color. – Sergio Jun 30 at 6:04 set t_Co=256 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How to open 4 netrw file explors simultaneously in format [:][:] (each dot being a netrw file explorer pane)

How to open 4 netrw file explors simultaneously in format [:][:] (each dot being a netrw file explorer pane) In vim or neovim I can do the following :e.|vs.|vs.|sp. To open various netrw file explorers simultaneously. The command above results in the following layout: |netrw0|netrw1|netrw2| | | |netrw3| Now what I want to accomplish is a oneliner which results in the following layout: |netrw0|netrw2| |netrw1|netrw3| I'm not sure if this is possible, ofcourse I can switch panes to get the above result, however that is not what I want because the thing I'm actually doing is creating a function in my vimrc which I link to a function key, that way I can press a function key and open the desired splitted file browsing layout. ps. in my .init.vim (I'm using neovim), I have "set splitright" in order to open vertical splitted windows by default on the right side. Turned out easier than I thought and I've discovered the solution qu...

how grep results into separate buffer or split window

how grep results into separate buffer or split window i try to grep current file and then the results to be in separate buffer or split window , NOT in the current buffer im in i need it to work with simple vim not using quickfix methods (vimgrep and such) i did try this : :r!grep foo % VIM: How to store the grep results in a buffer but it replaces the current buffer and only doing undo returns the previous file content so my question is: how to redirect the results or separate buffer or split window 2 Answers 2 Open a new buffer (here in a vertical window): :vnew Fill it with the output of a grep of the alternate file: grep :0r!grep foo # In one go: :vnew | 0r!grep foo # Huh, I would have sworn it wouldn't let me put the contents of grep into an unnamed buffer. – Christian Gibbons 2 days ago ...