NeoVintageous 1.20.0 has just been released. The highlights are search enhancements including a new 'smartcase' option and 'ignorecase' flags, new text objects, and command-line output improvements.

The new 'smartcase' option brings a powerful feature to the search commands, but before we look at it we need to understand the 'ignorecase' option.

'ignorecase' 'ic' 'noignorecase' 'noic'

By default, all search commands are case-sensitive, this includes the commands /, ?, n, N, :s, *, and #.

For example, by default a search is case-sensitive:

/fizz
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ

If the 'ignorecase' option is on, a search is case-insensitive.

:set ignorecase
/fizz
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|

Tip: You can toggle a boolean option by shouting!

:set {option}!

Tip: You can disable a boolean option by prefixing “no”.

:set no{option}

Tip: You can read an option with a mark of interrogation (the value will be shown in the window status bar).

:set {option}?

Tip: If you want the option to stick around after restarts, set it in your “neovintageousrc” file, you can open it from the Command Palette.

NeoVintageous: Open RC File

‘smartcase’

The 'smartcase' option overrides 'ignorecase' if the search pattern contains uppercase characters. It’s only used when the search pattern is typed and the 'ignorecase' option is on, this includes the commands /, ?, n, N, and :s, but not *, and #.

'smartcase' 'scs' 'nosmartcase' 'noscs'

If both options are enabled, an all lowercase search pattern is case-insensitive, but if the pattern contains an uppercase character it becomes case-sensitive.

:set ignorecase
:set smartcase
/fizz
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
/fIzZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ
fizz FIZZ |fIzZ| FiZZ

‘ignorecase’ search flags

When \c appears anywhere in a search pattern, the whole pattern is handled like 'ignorecase' is on. The actual value of 'ignorecase' and 'smartcase' is ignored. \C does the opposite: Force matching case for the whole pattern.

/fizz\c
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
|fizz| |FIZZ| |fIzZ| |FiZZ|
/fizz\C
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ
|fizz| FIZZ fIzZ FiZZ

New text objects

There are two new text-objects: / and _. They work similar to the quote text-object: They select from the previous to the next and only work within lines.

a/

“A slash delimited string”. Selects the text from the previous slash until the next slash (“an” object). Only works within the line.

i/

Like a/ but excludes the slashes (“inner” object).

Tip: Text objects are a series of commands that can be used in Visual mode or after an operator.

Hello /wo|rld/!
va/
Hello |/world/|!
ci/
Hello /|/!

Command-line output

Commands that generate output now reuse the same output panel, can be closed by pressing Enter, and have improved syntax highlighting.

Buffers

:ls

Show all buffers.

indicator description
% the buffer in the current window
a active buffer indicator
= readonly buffer indicator
+ modified buffer indicator

Each buffer has a unique number. That number will not change, thus you can always go to a specific buffer with “:buffer N”, where N is the buffer number.

:b[uffer] [N]

Registers

:reg[isters]

Display the contents of all numbered and named registers.

Tip: Map it!

nnoremap <leader>r :reg<CR>

History

:his[tory]

Print the history of entered commands.

New keys

All of the new keys can be mapped!

  • <k0>, <k1>, <k2>, <k3>, <k4>, <k5>, <k6>, <k7>, <k8>, <k9>, <kdivide>, <kenter>, <kminus>, <kmultiply>, <kperiod>, <kplus>

Further reading

  • :help nv
  • :help 'smartcase'
  • :help text-objects
  • :help :ls
  • :help :history
  • :help :registers
  • Release notes