pub fn open<T: AsRef<Path>>(
path: T,
line: Option<usize>,
col: Option<usize>,
) -> Result<()>Expand description
Opens a file in the editor and positions the cursor at the specified line and column.
§Errors
- If execution of “edit” command via
crate::common::exec_vim_cmdfails. - If setting the cursor position via
Window::set_cursorfails.
§Rationale
Executes two Neovim commands, one to open the file and one to set the cursor because it doesn’t seems possible to execute a command line “edit +call\n cursor(LNUM, COL)”.