Skip to content

Commit

Permalink
✨feat: gh.vimでissueを見たい
Browse files Browse the repository at this point in the history
  • Loading branch information
utubo committed Oct 3, 2023
1 parent 4faad09 commit f786439
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Jetpack 'othree/html5.vim'
Jetpack 'othree/yajs.vim'
Jetpack 'prabirshrestha/asyncomplete-buffer.vim'
Jetpack 'prabirshrestha/asyncomplete.vim'
Jetpack 'skanehira/gh.vim'
Jetpack 'thinca/vim-portal'
Jetpack 'thinca/vim-themis'
Jetpack 'tpope/vim-fugitive'
Expand Down Expand Up @@ -302,6 +303,12 @@ nn <Space>gd <Cmd>Gdiffsplit<CR>
nn <Space>gl <Cmd>Git pull<CR>
nn <Space>gt :<C-u>GitTagPush<Space>
nn <Space>gC :<C-u>Git checkout %
au vimrc FileType gh-issues {
nn <buffer> <CR> <ScriptCmd>execute 'new' [expand('%'), getline('.')->matchstr('[0-9]\+'), 'comments']->join('/')<CR>
}
au vimrc FileType gh-issue-comments {
nn <buffer> <CR> <ScriptCmd>execute 'bo vsplit' [expand('%'), getline('.')->matchstr('[0-9]\+')]->join('/')<CR><Cmd>setlocal wrap<CR>
}
Enable g:lexima_accept_pum_with_enter
def g:SetupLexima(a: number)
lexima#add_rule({ char: '(', at: '\\\%#', input_after: '\)', mode: 'ic' })
Expand Down
11 changes: 11 additions & 0 deletions src/.vimrc.src.vim
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Jetpack 'othree/html5.vim'
Jetpack 'othree/yajs.vim'
Jetpack 'prabirshrestha/asyncomplete-buffer.vim'
Jetpack 'prabirshrestha/asyncomplete.vim'
Jetpack 'skanehira/gh.vim'
Jetpack 'thinca/vim-portal'
Jetpack 'thinca/vim-themis'
Jetpack 'tpope/vim-fugitive' # Gdiffとか
Expand Down Expand Up @@ -383,6 +384,16 @@ nnoremap <Space>gt :<C-u>GitTagPush<Space>
nnoremap <Space>gC :<C-u>Git checkout %
#}}}

# gh {{{
# ftpluginにすると定義がバラバラになって見通し悪くなるかな
au vimrc FileType gh-issues {
nnoremap <buffer> <CR> <ScriptCmd>execute 'new' [expand('%'), getline('.')->matchstr('[0-9]\+'), 'comments']->join('/')<CR>
}
au vimrc FileType gh-issue-comments {
nnoremap <buffer> <CR> <ScriptCmd>execute 'bo vsplit' [expand('%'), getline('.')->matchstr('[0-9]\+')]->join('/')<CR><Cmd>setlocal wrap<CR>
}
# }}}

# lexima {{{
Enable g:lexima_accept_pum_with_enter
# 正規表現の括弧 `\(\)`と`\{\}`
Expand Down

0 comments on commit f786439

Please sign in to comment.