Tag Info

Hot answers tagged

5

For yanks, Vim supports setting both unnamed and unnamedplus: :set clipboard=unnamed,unnamedplus From :help clipboard-unnamedplus: When "unnamed" is also included to the option, yank operations (but not delete, change or put) will additionally copy the text into register '*'.


3

You can find out which colorschemes are installed (and try them out) via :colorscheme <Tab> (or <C-D>). If you've found a nice one, just :edit ~/.vimrc and put the corresponding command in there. Some colorschemes look better if you have a high-color terminal. You can find out the number of available colors via :set t_Co?; you can also try ...


2

The two vim instances are completely separate from each-other, but there are two possibilities to do this. If your version of vim was compiled with X clipboard support you can use eg. "+yy to yank the current line to the X clipboard register, alternatively putting set clipboard=unnamed in your vimrc to yank to the clipboard by default. See :help registers ...


2

A generic awk alternative: awk ' /^uid:/ { uid=$2 } /^homeDirectory:/ { if ($NF !~ uid"$") { $NF = $NF"/"uid } } { print } ' text.file


1

Usually *BSD provides different options for compiling a program, these are usually called flavours, this is also true for most Linux distributions. Read the Makefile in the directory of the port to see what options are available. Vim can be compiled with many features, for example, you may be in an environment where X11 isn't installed, so you have no need ...


1

This will do: /^[^']*\%('[^']*\)\{4}$ It searches for a quote followed by any non-quotes ('[^']) four times (\{4}; here, you can also specify ranges like \{2,5}). To ensure that the exact number matches in the line, the pattern is anchored to start (^[^']*, with optional non-quotes in front) and end ($, trailing non-quotes already included in the ...


1

By default, select the text and then you can use "+y See the help for the clipboard, :h clipboard.


1

In case there's always data to collect for 7 entries (plus a blank line) then this awkprogram will collect the respective data and print them at the end: awk '{a[NR%8]=a[NR%8]" "$0} END{for (i=1;i<=7;i++) print a[i]}' (Note that your data samples seem to have a lot of trailling blanks; if you want those blanks removed instead of joined, please adjust ...


1

This seems to be a problem with the version of vim that comes with OSX. You're better off installing a newer version of vim from homebrew brew install vim Beware if you're using RVM though as Ruby plugins might segfault if you compile them against anything other than the system Ruby. Best this if you use RVM. rvm use system; brew install vim You ...


1

Also, FYI, in GUI version of Vim: gui is for formatting (as opposite of cterm) guifg is for foreground color (as opposite of ctermfg) guibg is for background color (as opposite of ctermbg)



Only top voted, non community-wiki answers of a minimum length are eligible