
Ubuntu に別のサイトがあることに気付く前に、最初にこれを Unix Exchange に投稿するという間違いを犯しました。
私は、テキスト エディターとして vim を選択した Ubuntu を使用しています。vim でタブを切り替えるショートカットを設定する人もいます。デフォルトは gt と g T ですが、これは扱いにくく自然ではないと思います。エイリアスを設定して、f5 で左のタブに切り替え、f8 で右のタブに切り替えられるようにしたいと思います。この結果を得るために vimrc ページをどのように変更すればよいかわかりません。ありがとうございます。
答え1
キーをマッピングするための一般的な構文は次のとおりです。
{cmd} {attr} {lhs} {rhs}
where
{cmd} is one of ':map', ':map!', ':nmap', ':vmap', ':imap',
':cmap', ':smap', ':xmap', ':omap', ':lmap', etc.
{attr} is optional and one or more of the following: <buffer>, <silent>,
<expr> <script>, <unique> and <special>.
More than one attribute can be specified to a map.
{lhs} left hand side, is a sequence of one or more keys that you will use
in your new shortcut.
{rhs} right hand side, is the sequence of keys that the {lhs} shortcut keys
will execute when entered.
以下のコードを.vimrc
nnoremap <F5> gt
nnoremap <F8> gT
詳細なチュートリアルは他の場所でも入手できます。以下を参照してください。