I would like to open a file and have nvim automatically be in search mode once the file is opened.
I need to find the correct command to use, probably in the form of nvim -c Command
file.txt
To clarify, I want to start nvim and be able to start searching by typing in my search string without first pressing '/' to enter search mode.
running nvim -c '/searchString' executes the search immediately and is not what I want
My use case is that I use nvim as a scrollback pager for kitty.
# kitty passes text to nvim via stdinput which i write to a tmp file in /tmp/kitty_scrollback_buffer
# I then open this file with the nvim terminal by catting the file
# is there anyway to then automatically enter command search mode so that nvim is ready to search when i enter a search string (I do not want to type /, i want to be able to search immediately)
exec nvim \
-u NONE \
-c "silent! write! /tmp/kitty_scrollback_buffer | terminal cat /tmp/kitty_scrollback_buffer - " \