Hot answers tagged

5

Actually, it turned out to be quite simple. I followed the suggestion to run brew doctor and I got these results: Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: ruby So I ran brew link ruby. This is ...


4

This is not an elegant solution---it is quick and dirty--but it does work on single files and you can use it as a shell script. It's a sequence of three commands which perform the following: Open file in vim (read only mode): vim -R Save the file in plaintext and quit: -c ":set key= | sav ${filename}.plain | q Cat the plaintext file: cat ${filename}.plain ...


3

The problem you are experiencing is that in all RedHat distributions and their derivatives--including CentOS--/bin/vi is the "tiny"/"small" version of Vim which has very limited functionality. It lacks the ability to do any sort of evaluation, set a number of options, do syntax highlighting, and so on. Your vimrc is being read, but a significant portion of ...


3

Have a look at the open-source vimdecrypt : Command line tool for decrypting vim-blowfish-encrypted files. As of version 7.3 vim offers strong built in blowfish encryption/decryption, which for certain purposes is more convenient than filtering through gnupg. Unfortunately the resulting files can only be read back by vim which makes it hard to ...


2

Ctrlu will scroll up half a page. Ctrld will scroll down half a page. You may change this behaviour by setting scroll to the number of lines you wish these commands to scroll. For example: Esc:set scroll=1Enter Or, in your ~/.vimrc file: set scroll=1


2

Only tac The command tac can do it. $ tac -b -s "######" file.log Call tac by Vim If you want run it in Vim: :%!tac -b -s "\#\#\#\#\#\#" % means all lines. ! runs external command. The backslash is necessary to escape the number sign # in "\#\#\#\#\#\#". Only Vim These commands replace new line by tab. If tab is present in the log, use another ...


1

If there is a final newline at the end, the following command does what you want in Vim: g/^###/.,/^$/m 0 Which searches for lines starting with ### takes the range from ### til the next blank line and moves it to the top. If there is no final newline, it will probably abort with e.g. E16: invalid range, in that case you could adjust the regex like this: ...


1

Since AutoHotkey listens to actual keyboard events and is not aware of what goes on internally on any specific application, and since Vim's mappings are not actually sending new keyboard events when they trigger, no. You can create an AutoHotkey macro that is specific to Vim only: SetTitleMatchMode, RegEx #IfWinActive, - G?VIM\d+ :*?:`,w:: do ...


1

The command :se hls turns on an option only. You will visually see nothing change. See: :help 'hlsearch' (The quotes are meant to be typed.) If what you are trying to do is get Vim to start highlighting the last used search string every time a new buffer is entered, that command won't help you. Unfortunately Vim has no inverse of the :nohlsearch command,...


1

Since I don't use pathogen I don't know if you can modify its behavior, but I would assume you can. Check its documentation. Alternatively, you can possibly override pathogen and other plugins--assuming they aren't setting options on autocmd events--by putting your settings in something like ~/.vim/after/plugin/overrides.vim. See: :help 'runtimepath' ...


1

there is no argexpr command. However you can do it like this: :argadd `some-command` which runs some-command and adds the result to the argument list.


1

My two cents, I run this whenever upgraded my python via homebrew. brew reinstall vim --HEAD --with-cscope --with-lua --override-system-vim brew reinstall macvim --HEAD --with-cscope --with-lua --override-system-vim


1

This does not answer your question about batch processing, but it is another way to explain what Ex-mode is. You know how you press : to go into command-line mode and enter commands? Well Ex-mode also lets you enter the same commands, except Vim does not leave Ex mode after you enter a command, it stays in Ex mode and you can enter another command. So it is ...



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