Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I make the cursor NOT blink? #17

Closed
alienbogart opened this issue Mar 30, 2019 · 9 comments · Fixed by #42
Closed

How can I make the cursor NOT blink? #17

alienbogart opened this issue Mar 30, 2019 · 9 comments · Fixed by #42

Comments

@alienbogart
Copy link

alienbogart commented Mar 30, 2019

OS: MX Linux 18.

NVIM v0.4.0-429-gf282324e1Build type: RelWithDebInfo

checkhealth

health#deoplete#check
========================================================================
## deoplete.nvim
  - OK: exists("v:t_list") was successful
  - OK: has("timers") was successful
  - OK: has("python3") was successful
  - OK: Python3.6.1+ was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo
    LuaJIT

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $VTE_VERSION='4601'
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: tmux-256color

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: pyenv: Path: /home/dave/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/dave/.pyenv
  - INFO: Using: g:python_host_prog = "/usr/bin/python2.7"
  - INFO: Executable: /usr/bin/python2.7
  - INFO: Python version: 2.7.13
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: pyenv: Path: /home/dave/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/dave/.pyenv
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /home/dave/.pyenv/versions/3.7.2/bin/python3
  - INFO: Python version: 3.7.2
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - WARNING: `node` and `npm` (or `yarn`) must be in $PATH.
    - ADVICE:
      - Install Node.js and verify that `node` and `npm` (or `yarn`) commands work.

@justinmk
Copy link

Did you read :help guicursor ?

@alienbogart
Copy link
Author

alienbogart commented Mar 30, 2019

I did:

blinkwait{N}				*cursor-blinking*
		blinkon{N}
		blinkoff{N}
			blink times for cursor: blinkwait is the delay before
			the cursor starts blinking, blinkon is the time that
			the cursor is shown and blinkoff is the time that the
			cursor is not shown.  The times are in msec.  When one
			of the numbers is zero, there is no blinking. E.g.: >
				:set guicursor=n:blinkon0

This setting had no effect.

@vhakulinen
Copy link
Owner

Currently its not possible to make the cursor not to blink. I'll eventually fix this at some point, but any PRs are welcome.

@alienbogart
Copy link
Author

@vhakulinen thank you for your kind answer. Sadly, I don't have the knowledge to contribute yet. Please to update this issue if there's any change.

@ngortheone
Copy link

@vhakulinen +1 . Blinking cursor is distracting.

@vhakulinen
Copy link
Owner

Nonblinking cursor added (using guicursor).

Relevant part in gnvim's documentation:

Cursor *gnvim-cursor*
*gnvim-cursor-blinking*
Gnvim's cursor can be set to blink with `guicursor`.
Make cursor blink: `set guicursor+=a:blinkon333`
Make cursor not to blink: `set guicursor+=a:blinkon0`

Non blinking cursor might be your new default, depending on your guicursor value.

Currently the non blinking cursor is "just" set to 50% opacity. Anyone interested in implementing similar functionality as TUI has (inverted fg/bg colors under cursor) and is up for some coding can checkout #42 (comment).

vhakulinen added a commit that referenced this issue May 25, 2019
@vhakulinen
Copy link
Owner

Proper (e.g. how TUI does it) nonblinking cursor implemnted in 7cd80b6.

@badosu
Copy link
Contributor

badosu commented May 26, 2019

Awesome! I was diving through the code along the week, after seeing your implementation I think it was better that you were able to do it though.

BTW, this talk has good resources to understand ropes logic (which I was unaware of): https://www.youtube.com/watch?v=SKtQgFBRUvQ

@vhakulinen
Copy link
Owner

I wouldn't pay too much attention to the gnvim's "rope". Its there, it works and has tests so you don't break it. It most likely is not superior in any way to just using 2D array in this case, which (I think) neovim-gtk does, and probably all the other GUIs too. But it was fun to write and neat to use 😈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants