This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from pyls_jsonrpc import dispatchers, streams, endpoint | |
class LangServer(dispatchers.MethodDispatcher): | |
def __init__(self): | |
# sys.stdin.buffer を使うと、バイト列で入出力できる | |
# python-language-server も sys.stdin.buffer と sys.stdout.buffer を使っていた | |
self.jsonrpc_stream_reader = streams.JsonRpcStreamReader(sys.stdin.buffer) | |
self.jsonrpc_stream_writer = streams.JsonRpcStreamWriter(sys.stdout.buffer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
" 書き方は以下を参照 | |
" * https://github.com/Yggdroot/LeaderF/issues/144#issuecomment-540008950 | |
" * http://bit.ly/2NdiX1x | |
" :Leaderf packadd | |
" :Leaderf git_checkout | |
" :Leaderf mrw | |
" :Leaderf todo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
" bitly を使って URL を短くする | |
" https://dev.bitly.com/v4_documentation.html | |
let s:HTTP = vital#vital#import('Web.HTTP') | |
let s:JSON = vital#vital#import('Web.JSON') | |
let s:base_url = 'https://api-ssl.bitly.com/v4' | |
let s:default_token = '4c0464b927dc17e9c824ca0f2e01695adf3d26cc' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! FavoriteHelps call FavoriteHelps() | |
" 順序を保持するため、リスト | |
let s:fav_helps = [] | |
call add(s:fav_helps, ['function-list', '関数一覧']) | |
call add(s:fav_helps, ['user-commands', 'command の書き方']) | |
call add(s:fav_helps, ['autocmd-events', 'autocmd 一覧']) | |
call add(s:fav_helps, ['E500', '<cword> とか <afile> とか']) | |
call add(s:fav_helps, ['usr_41', 'Vim script 基本']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~ | |
# ここは、試したいプラグインによる | |
git clone https://github.com/Shougo/denite.nvim | |
git clone https://github.com/roxma/nvim-yarp | |
git clone https://github.com/roxma/vim-hug-neovim-rpc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
scriptencoding utf-8 | |
syntax enable | |
filetype plugin indent on | |
set nocompatible | |
" cd ~ | |
" " git clone https://github.com/Shougo/defx.nvim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
scriptencoding utf-8 | |
syntax enable | |
filetype plugin indent on | |
set nocompatible | |
set runtimepath+=~/vimfiles/plugged/defx.nvim,~/vimfiles/plugged/nvim-yarp,~/vimfiles/plugged/vim-hug-neovim-rpc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:winid = 0 | |
function! s:open_pop() abort | |
if s:winid != 0 | |
call s:show_pop() | |
return | |
endif | |
let s:winid = popup_create('', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:winid = popup_notification('I love Vim!', { | |
\ 'line': 4 | |
\ }) | |
let s:text = ['I love Vim!'] | |
function! s:set_text(timer) abort | |
call add(s:text, 'I love Vim!') | |
call popup_settext(s:winid, s:text) | |
endfunction |