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
| ---@enum vim.task.TaskStatus | |
| local TaskStatus = { | |
| pending = 'pending', | |
| success = 'success', | |
| failure = 'failure', | |
| aborted = 'aborted', | |
| } | |
| ---Internal registry for tracking asynchronous tasks. | |
| ---@type table<thread, vim.task.Task> |
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
| local cmp = require('cmp') | |
| vim.api.nvim_create_user_command('CmpToggle', function() | |
| local config = cmp.get_config() | |
| if config.enabled == false then | |
| cmp.setup { enabled = require('cmp.config.default')().enabled } | |
| else | |
| cmp.setup { enabled = false } | |
| end | |
| end, {}) |
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! MacroStart call s:command_macro_start() | |
| function! s:command_macro_start() abort | |
| normal! 0qq | |
| endfunction | |
| command! MacroFinish call s:command_macro_finish() | |
| function! s:command_macro_finish() abort | |
| normal! q | |
| endfunction |
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
| -- You can also use require('mpack') for data serialization between server and client. | |
| local uv = require "luv" | |
| local SOCK = string.format("/tmp/server-%s.sock", os.clock()) | |
| uv.new_thread(function(sock) | |
| local uv = require "luv" | |
| local server = uv.new_pipe(false) | |
| server:bind(sock) |
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
| autocmd! vimrc FileType denite-filter call s:setup_denite_filter() | |
| function! s:setup_denite_filter() | |
| imap <silent><nowait><buffer> <Esc> <Plug>(denite_filter_quit) | |
| endfunction |
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
| local lapi = require'lapi' | |
| local SELECTOR = { | |
| markers = { 'package.json' }, | |
| filetypes = { 'javascript', 'typescript', 'javascript.jsx', 'typescript.tsx' }, | |
| } | |
| lapi.extensions.register('eslint', { | |
| is = function(document) |
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
| if has('vim_starting') | |
| set encoding=utf-8 | |
| endif | |
| scriptencoding utf-8 | |
| if &compatible | |
| " vint: -ProhibitSetNoCompatible | |
| set nocompatible | |
| endif |
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
| autocmd FileType defx call s:defx_setting() | |
| function! s:defx_setting() abort | |
| nnoremap <silent><buffer><expr>h defx#do_action('call', 'DefxCloseTree') | |
| nnoremap <silent><buffer><expr>l defx#is_directory() ? defx#do_action('open_tree') . 'j' : defx#do_action('open', 'edit') | |
| endfunction | |
| function! DefxCloseTree(_) | |
| " candidate is opend tree? | |
| if defx#is_opened_tree() | |
| return defx#call_action('close_tree') |
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
| 1. gvim を起動 | |
| 2. .git 管理されているファイルを開く | |
| 3. (開いたファイルと同一階層に)「日本語のファイル」というファイル名でファイルを作成する | |
| 4. :UniteVersions status:! を実行 | |
| 5. ステータス一覧が表示されるが「日本語のファイル」が文字化けしている |
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 g:quickrun_config = {} | |
| let g:quickrun_config['watchdogs_checker/_'] = { | |
| \ 'hook/close_quickfix/enable_exit': 1, | |
| \ } | |
| let g:watchdogs_check_BufWritePost_enable=1 | |
| call watchdogs#setup(g:quickrun_config) |
NewerOlder