Neovim plugin to access Scrapbox(https://scrapbox.io/).
The dependencies on other softwares/libraries for this project. This software may work even if these requirements aren't met, but the behavior on that case can't be supported officially.
- Neovim (>= 0.3.x)
- Python (>= 3.7.x)
- Google Chrome
- Create a directory to put this plugin.
$ mkdir -p ~/.config/nvim/bundle
- Clone this project under step1's directory.
$ git clone [email protected]:FGtatsuro/scrapbox.nvim.git ~/.config/nvim/bundle/scrapbox.nvim
- Add a directory of cloned this project to
$runtimepath
.
" Your vimrc
let &runtimepath.=','.$HOME.'/.config/nvim/bundle/scrapbox.nvim'
- Update plugin info.
# In Neovim
:UpdateRemotePlugins
:qa!
- Set an URL of your Scrapbox project to a variable
g:scrapbox#project_url
.
let g:scrapbox#project_url = "https://scrapbox.io/your_project_url"
- Access a scrapbox page via
ScrapboxAccessPage
command. The page with given name is opend via Webbrowser.
# In Neovim
# In this case, a page 'https://scrapbox.io/your_project_url/vim' is opened.
# If the page doesn't exist, it is created with current buffer.
# If the page exists, the contents of current buffer are appended to it.
:ScrapboxAccessPage vim
- Start Neovim with a config file and an environment variable
SCRAPBOX_PROJECT_URL
to load a plugin of this project. IfNVIM_PYTHON_LOG_FILE
andNVIM_PYTHON_LOG_FILE
are set, you can check logs of Neovim.
# FYI: https://github.com/neovim/python-client/blob/master/docs/usage/remote-plugins.rst
$ NVIM_PYTHON_LOG_LEVEL=DEBUG NVIM_PYTHON_LOG_FILE=./scrapbox.log SCRAPBOX_PROJECT_URL='https://scrapbox.io/your_project_url' nvim -u tests/vimrc
- Update the remote plugin manifest and restart Neovim. After that, please check futures of your plugin.
# In Neovim
:UpdateRemotePlugins
:qa!
...
$ (Same command to step1)
:(Run plugin's command/function/mapping and so on)