XEDエディタの最後のカーソル位置を一時的に無視/無効にする方法は?

XEDエディタの最後のカーソル位置を一時的に無視/無効にする方法は?

コンソールでエディタXEDの最後のカーソル位置を無視する方法は?

私たち全員が知っているように、次の方法で同様の結果を得ることができます。

XED、検索履歴を削除する:

gsettings reset org.x.editor.state.history-entry history-search-for

XED、交換履歴の削除:

gsettings reset org.x.editor.state.history-entry history-replace-with

誤解を避けるために具体的に書いてください。

私たちが端末を探しているコードは、最後のカーソル位置を無視しますが、永久に無効にしないことです。

ベストアンサー1

restore-cursor-position無効にできます。

gsettings set org.x.editor.preferences.editor restore-cursor-position false

これは永久的です。一時的な解決策が必要な場合は、asオプションと問題のファイル名をxed使用して呼び出すことができます。+1

xed +1 infile

これによりinfileカーソルが開き、ファイルの先頭に配置されます。
デスクトップランチャーで使用するには、次のように機能する必要があります。

Exec=xed +1 %u

いいですね。別の方法は、代替構成dconfファイルを使用することです。キーをに設定し、false設定ファイルを別のディレクトリに保存してからキーをリセットしますtrue。カーソル位置を無視するには、保存されたプロファイルをロードし、それ以外の場合はxed正常に実行されます。走る

mkdir -p ~/.alt_xed/dconf/
gsettings reset org.x.editor.state.history-entry history-search-for
gsettings reset org.x.editor.state.history-entry history-replace-with
gsettings set org.x.editor.preferences.editor restore-cursor-position false
cp ~/.config/dconf/user ~/.alt_xed/dconf
gsettings set org.x.editor.preferences.editor restore-cursor-position true

その後、次のコマンドを使用してエディタを起動すると、ファイルの最初の行にカーソルがあるすべてのファイルが開きます。

XDG_CONFIG_HOME=~/.alt_xed xed

おすすめ記事