From 22e24318c9b959b85f4f85e0ff224058a4dc2066 Mon Sep 17 00:00:00 2001 From: daa84 Date: Fri, 13 Oct 2017 13:23:05 +0300 Subject: [PATCH 1/3] Update README.md --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a1ec3ce..3bacf14 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,14 @@ Or to some custom path: make PREFIX=/some/custom/path install ``` -## Ubuntu snap package -Not usable for now due to some limitation! - -This package also includes neovim, so neovim not needed and if present in system - not used. Install command: +## archlinux +AUR package for neovim-gtk https://aur.archlinux.org/packages/neovim-gtk-git +```shell +git clone https://aur.archlinux.org/neovim-gtk-git.git +cd neovim-gtk-git +makepkg -si ``` -sudo snap install nvim-gtk --channel=candidate -``` -There is some limitation for package: only `/home` directory available for editing and '~' is mapped to snap home directory. -Config files must be placed in `~/snap/nvim-gtk/common/config/nvim/[g]init.vim` directory -Run command: `nvim-gtk ` or from dash: `NeovimGtk`. - -To run neovim provided by snap package execute: `nvim-gtk.neovim`. # Build ## Linux From e7cd39607f9fefb70a47e14279ad78910c43d901 Mon Sep 17 00:00:00 2001 From: daa Date: Sat, 14 Oct 2017 14:42:50 +0300 Subject: [PATCH 2/3] Insert before cursor --- src/shell.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell.rs b/src/shell.rs index bebc030..b5a177c 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -333,7 +333,7 @@ impl State { let nvim = self.nvim(); if let Some(mut nvim) = nvim { if self.mode.is(&mode::NvimMode::Insert) || self.mode.is(&mode::NvimMode::Normal) { - let paste_code = format!("normal! \"{}p", clipboard); + let paste_code = format!("normal! \"{}P", clipboard); nvim.command(&paste_code).report_err(&mut *nvim); } else { let paste_code = format!("{}", clipboard); From cda55e0f7d7e0e0b35b058d63f2828768094a4e5 Mon Sep 17 00:00:00 2001 From: daa Date: Sat, 14 Oct 2017 14:50:13 +0300 Subject: [PATCH 3/3] Make ui attach really async --- src/shell.rs | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/shell.rs b/src/shell.rs index b5a177c..8d2cce9 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -766,25 +766,19 @@ fn init_nvim_async( }); // attach ui - let mut nvim = Some(nvim); - glib::idle_add(move || { - let mut nvim = nvim.take().unwrap(); - if let Err(err) = nvim::post_start_init( - &mut nvim, - options.open_path.as_ref(), - cols as u64, - rows as u64, - ) - { - show_nvim_init_error(&err, state_arc.clone()); - } else { - let mut state = state_arc.borrow_mut(); - state.nvim.borrow_mut().set_initialized(nvim); - state.cursor.as_mut().unwrap().start(); - } - - Continue(false) - }); + if let Err(err) = nvim::post_start_init( + &mut nvim, + options.open_path.as_ref(), + cols as u64, + rows as u64, + ) + { + show_nvim_init_error(&err, state_arc.clone()); + } else { + let mut state = state_arc.borrow_mut(); + state.nvim.borrow_mut().set_initialized(nvim); + state.cursor.as_mut().unwrap().start(); + } } fn draw_initializing(state: &State, ctx: &cairo::Context) {