neovim

neovim Gruvbox appears all white and grey, I can't spot the mistake

半世苍凉 提交于 2020-01-17 12:18:07
问题 I can’t get Gruvbox to work. I’m using neovim. And I would really appreciate if someone can locate the mistake. I’ve installed gruvbox in ~/.config/nvim/bundle/ and this is my entire ~/.config/nvim/init.vim file. I tried to add True Color in two different ways. execute pathogen#infect() filetype plugin indent on set tabstop=4 set expandtab map <C-n> :NERDTreeToggle<CR> set termguicolors let $NVIM_TUI_ENABLE_TRUE_COLOR=1 colorscheme gruvbox And when I run :colorscheme from inside vim I see

neovim Gruvbox appears all white and grey, I can't spot the mistake

拈花ヽ惹草 提交于 2020-01-17 12:18:06
问题 I can’t get Gruvbox to work. I’m using neovim. And I would really appreciate if someone can locate the mistake. I’ve installed gruvbox in ~/.config/nvim/bundle/ and this is my entire ~/.config/nvim/init.vim file. I tried to add True Color in two different ways. execute pathogen#infect() filetype plugin indent on set tabstop=4 set expandtab map <C-n> :NERDTreeToggle<CR> set termguicolors let $NVIM_TUI_ENABLE_TRUE_COLOR=1 colorscheme gruvbox And when I run :colorscheme from inside vim I see

Nvim : Strange character after pressing enter

陌路散爱 提交于 2019-12-25 18:57:38
问题 Using nvim 0.2.0-dev whenever i press enter or single quote strange symbol appears followed by 6q in the end of the line as shown in image below. nvim error image 回答1: Better answer IMHO add to init.vim set guicursor= That took care of my prb on 2.0 回答2: Solved this issue by installing stable version of neovim First removed unstable version sudo apt-get remove neovim then removed repository sudo add-apt-repository --remove ppa:neovim-ppa/unstable update repository sudo add-get update Now

VIM textwidth has no effect

China☆狼群 提交于 2019-12-20 10:25:14
问题 This feels like a dumb question, but I can't find an answer on the Internet (or in VIM help). I'm using VIM 7.2 on Mac OS X. All I want to do is wrap my lines at 72 characters, but doing :set textwidth=72 has no effect. The textwidth is being set correctly (I can see that when I just query ":set textwidth"), but neither existing lines nor new lines that I type after setting textwidth get wrapped. If I start a new line, still doesn't wrap. Open and close the file, no change. I've also tried

Cannot resize pane with mouse

♀尐吖头ヾ 提交于 2019-12-12 04:58:33
问题 I use mouse often to resize panes. Recently I'm trying out tabs, and found that it's possible to switch tabs using mouse too, simply by clicking on a tab. However, after successfully changing the tab by clicking on it using mouse, I am no longer able to resize the pane using mouse. Instead, every time I click on the pane border and drag mouse cursor, the tabs get rearranged (e.g. it looks like :tabm happens), as if the mouse click "stuck" the first time I clicked tab and now "holds" the tab.

Vim: check if running as a pager

ε祈祈猫儿з 提交于 2019-12-12 03:14:00
问题 I searched through Vim's source repository (which includes help doc too) for any references to pager but couldn't find so asking here- Is there a way to see if vim is running as a pager? I'd like to run certain commnands automatically when that happens. EDIT: By pager, I mean vim reading from stdin when piped as vim - . I use a plugin called AnsiEsc mentioned in another vim related question so would like to load that automatically. I would also like to remap some keybindings. 回答1: You should

Folding JSON at specific points

时光总嘲笑我的痴心妄想 提交于 2019-12-08 01:06:25
问题 I have a JSON file and would like to fold it with a toggle ( z a ) at every line with a key called subsection. I thought about using a global command like: :g/subsection/za but it doesn't work since a global command expects an editing function as the second argument, and z a is not editing. Any thoughts? 回答1: How about: :g/subsection/norm za From :h :g To repeat a non-Ex command, you can use the ":normal" command: > :g/pat/normal {commands} 回答2: For opening / closing folds (at a line / range)

Folding JSON at specific points

久未见 提交于 2019-12-06 11:26:15
I have a JSON file and would like to fold it with a toggle ( z a ) at every line with a key called subsection. I thought about using a global command like: :g/subsection/za but it doesn't work since a global command expects an editing function as the second argument, and z a is not editing. Any thoughts? How about: :g/subsection/norm za From :h :g To repeat a non-Ex command, you can use the ":normal" command: > :g/pat/normal {commands} For opening / closing folds (at a line / range), there are dedicated Ex commands : :foldopen and :foldclose . Those can be directly used with :global/subsection

How do I search in all files of my project using VIM?

感情迁移 提交于 2019-12-03 10:42:33
问题 There are a couple of things I do not yet understand the VIM way. One of these is searching in a project like so (using VIM in Atom): I use CtrlP currently for file names, but what about the contents? How can I search with a string, and then look through a list of all occurrences using VIM and/or VIM plugins? 回答1: I've found an even better solution for this: FZF It simply searches through everything in your project asynchronously using the :Ag command. 回答2: Use :grep or :vimgrep to search

Clipboard failure in tmux + vim after upgrading to MacOS Sierra

拟墨画扇 提交于 2019-12-03 03:29:22
问题 Yesterday, I upgraded to MacOS Sierra and it broke my clipboard functionality in my tmux + neovim setup. Here is the behavior: I can use the standard ctrl+c, ctrl+p to copy/paste between system <-> vim I can yank/paste between two VIM instances when NOT in a tmux session I cannot yank/paste between two VIM instances when in a tmux session Whenever I use the clipboard in vim within a tmux session, I get the following vim error: clipboard: error: My .vimrc is huge, but here's what I think might