1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-22 01:16:19 +03:00
43 Home
Tae Won Ha edited this page 2023-12-11 17:11:56 +01:00

init.vim

You may want to check the gui_vimr flag in init.vim to apply some settings only to VimR:

if exists("g:gui_vimr")
  " Here goes some VimR specific settings like
  color xyz
endif

Or you can place VimR specific settings in ~/.config/nvim/ginit.vim.

Supported Gestures

  • Pinch to zoom in or out.
  • Two-finger scrolling.

Live Windows Resizing

Live window resizing is turned off by default. You can turn it on in the Advanced Preferences: Appearance Preferences

Ligatures

Ligatures are turned off by default. Turn it on in the Appearance Preferences: Appearance Preferences

Customizing Keyboard Shortcuts

You can change shortcuts of menu items in the Shortcuts Preferences: Appearance Preferences Customized shortcuts will be displayed blue.

Commands From Within Neovim

You can use the following commands to control some of GUI elements

  • VimRMaximizeWindow
  • VimRToggleFullscreen
  • VimRHideTools, VimRToggleTools, VimRShowTools
  • VimRHideToolButtons, VimRToggleToolButtons, VimRShowToolButtons
  • VimRMakeSessionTemporary: VimR does not store GUI settings, e.g. window size, visibility of tools and tool buttons.
  • VimRSetFontAndSize "Some Font Name", 13: Set the font and the size to Some Font Name and 13, respectively. The size must be an integer.
  • VimRSetLinespacing 1.0: Set the linespacing to 1.0. The value must be a float.

If you want to execute some of these commands during startup, you must place them in ~/.config/nvim/ginit.vim.

Scroll and Render Performance

You can turn on concurrent computation of the glyphs in the Advanced Preferences. This may result in faster rendering depending on the situations. However, it will also have higher CPU usage.

$PATH in VimR

Make sure that the environment variable SHELL is set to a reasonable value: VimR uses SHELL to launch the Neovim background process.

Command Line Tool

VimR comes with a command line tool vimr:

$ vimr --help
usage: vimr [-h] [--dry-run] [--cwd CWD] [--line LINE] [--wait] [--nvim]
            [--cur-env | -n | -s]
            [file [file ...]]

Open files in VimR: By default all files are open in tabs in the front most
window or in a new window if there is none. The working directory will be set
to the current directory.

positional arguments:
  file

optional arguments:
  -h, --help   show this help message and exit
  --dry-run    Just print the 'open' command.
  --cwd CWD    Set the working directory.
  --line LINE  Go to line
  --wait       This command line tool will exit when the corresponding UI
               window is closed.
  --nvim       All arguments except --cur-env, --line, --dry-run and --wait
               will be passed over to the (new) nvim instance in a new UI
               window.
  --cur-env    Use the current environment variables when launching the
               background neovim process. All files will be opened in a new
               window.
  -n           Open files in tabs in a new window.
  -s           Open files in separate windows.

For example to use VimR as git difftool, add the following to your ~/.gitconfig

[difftool "vimrdiff"]
    cmd = vimr --wait --nvim -d $LOCAL $REMOTE
[diff]
    tool = vimrdiff

It can be installed via Preferences ➝ General ➝ "Copy 'vimr' CLI tool..." button:

Copy CLI tool button

Automatic Update

If you want to be notified for snapshot builds, you can turn on Snapshot Update Channel in the Advanced preferences pane:

Use Snapshot Update Channel


The old wiki about the MacVim-based vimR can be found in VimR MacVim.