Windows Terminal でCUI版VIMを開いたときにカラースキームの色表示がおかしくなる
.vimrc に以下を追記した
1 2 |
set t_Co=256 |
VIMのカラースキームが256色に対応していないtため?
Windows Terminal でCUI版VIMを開いたときにカラースキームの色表示がおかしくなる
.vimrc に以下を追記した
1 2 |
set t_Co=256 |
VIMのカラースキームが256色に対応していないtため?
機能 | ショートカット |
---|---|
Zoom | Ctrl + 1 |
├ 拡大・縮小 | マウススクロール or 上下キー |
├ 描画開始 | 左クリック |
└ 描画停止 | 右クリック |
LiveZoom | Ctrl + 4 |
描画 | Ctrl + 2 |
├ ペンの幅を変更 | Ctrl + マウススクロール |
├ ペン | R(赤), G(緑), B(青), O(オレンジ), Y(黄), P(ピンク) |
├ ハイライトペン | Shift + ペンの色 |
├ ぼかし | X |
├ 図形 | Shift(線), Ctrl(矩形), Tab(楕円), Shift + Ctrl(矢印) |
├ テキスト入力 | T |
│ └ フォントサイズ変更 | Ctrl + マウススクロール |
├ 単色画面 | W(白), K(黒) |
├ 描画を消去 | Ctrl + Z |
└ 描画をリセット | E |
※ショートカットは抜粋
参考サイト:ZoomIt
Python 3.12.2のpipコマンドを実行するとエラーが発生。
‘pip list
‘コマンドを実行すると以下のようなエラーが発生。
1 2 3 4 5 6 7 8 |
ERROR: Exception: Traceback (most recent call last): . . File "C:\Users\user\scoop\apps\python\current\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2164, in <module> register_finder(pkgutil.ImpImporter, find_on_path) ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? |
__init__.py
ファイル中の2箇所を’ImpImporter’から’zipimporter’へ書き換える
1 2 3 4 5 6 7 8 9 |
# 変更前 . . register_finder(pkgutil.ImpImporter, find_on_path) . . register_namespace_handler(pkgutil.ImpImporter, file_ns_handler) . . |
1 2 3 4 5 6 7 8 9 |
# 変更後 . . register_finder(pkgutil.zipimporter, find_on_path) . . register_namespace_handler(pkgutil.zipimporter, file_ns_handler) . . |
ファイル書き換え後に’pip list
‘コマンドを実行するとエラーが出ず正常に実行できました。
1 2 3 4 5 6 7 |
$ pip list Package Version ---------- ------- pip 22.3.1 [notice] A new release of pip available: 22.3.1 -> 24.0 [notice] To update, run: python.exe -m pip install --upgrade pip |
以下のコマンドでpipのアップデートを実行する。
1 |
python.exe -m pip install --upgrade pip |
SSIDがステルス設定になっているアクセスポイントを設定すると、アクセスポイントに接続で気合い場合があります。
接続できない場合は、以下の設定を行います。
WSLのウインドウをConEmuで表示する方法です。
以下の方法での設定は、WSLの設定が完了していて、ディストリビューションが1つの場合です。
ConEmuから直接WSLのウインドウを”Attach to”で取り込みするとうまくいきません。
Settings -> Startup -> Tasks の Predefined tasks に新しいタスクを作成して “C:\Windows\System32\bash.exe ~” を設定する。
以下の設定でも起動できるはずです。
こちらの場合ですと、複数のディストリビューションをインストールしている場合でも特定のexeファイルを設定できます。
“C:\Users\[user name]\AppData\Local\Microsoft\WindowsApps\[Linux exe file] -cur_console:p”
ブラウザには、閲覧履歴・一時ファイル・クッキー等の履歴を残さずに閲覧できるシークレットモードがあります。
シークレットモードは、共有PCや他人のPC等でサービスにログインするときなどには履歴を残さずに使用できるので便利です。
キーボードショートカットでシークレットモードを起動する方法をブラウザ別にまとめておきます。
ブラウザ | ショートカットキー |
---|---|
Google Chrome | [Ctrl]+[Shift]+N |
Mozilla Firefox | [Ctrl]+[Shift]+P |
Internet Explorer | [Ctrl]+[Shift]+P |
Microsoft Edge | [Ctrl]+[Shift]+P |
Safari | なし |
Firefoxのデフォルトの設定では、最後のタブを閉じるとFirefoxも終了してしまいます。
Firefoxを再起動すれば良いのですが、以下の設定を行えば最後のタブを閉じてもFirefoxが終了しないように設定することができます。
この設定で、Firefoxの最後のタブを閉じてもFirefoxが終了しなくなります。
bashで以前入力したコマンドを再度入力したいときや一部変更して実行したいときがあります。
コマンドが短い場合や簡単な場合は入力してしまった方が圧倒的に早いですが、ファイルディレクトリや長いコマンドの場合は間違えたり入力がめんどくさいです。
bashを使用してHistoryの設定を行っている場合は、「Ctrl+r」でコマンド履歴を表示できる。
「Ctrl+r」を繰り返すことで、一番新しい履歴から表示されます。
「Ctrl+r」をで履歴検索モードにしたあと、検索したいコマンドの先頭部分を入力すると、入力したものと一致する履歴が順番に表示される。
これで、作業がだいぶ早くなると思います。
久しぶりにMSYS2を更新したら、ConEmuで起動できなくなってしまった。
ConEmuのサイトを見ていたら、新たにMSYSのターミナルコネクタを起動するプラグインがあるとのこと。
cygwin/msys terminal connector
(http://conemu.github.io/en/CygwinMsysConnector.html)
「Please note, status of this plugin is ‘Experimental’.」(公式サイトより)
まだ実験段階である注意事項が記載されているため安定版では無いみたい。
ファイルはgithubのサイトからダウンロードできる。
ページ中程の「Download latest release of connector.」をクリックしてダウンロードページから「terminals***.7z」をダウンロードする。
github.com Maximus5/cygwin-connector
https://github.com/Maximus5/cygwin-connector/releases
ダウンロードしたファイルの中から適切なバイナリをMSYS2のbinディレクトリに入れてConEmuからコネクタを起動する。
SSHを使用した接続がうまくいかない
調べてみると、SSH接続の設定がレジストリに書き込まれていないと接続できないみたい。
plinkコマンドを使用してレジストリに設定を書き込む。
SSHを登録するコマンド
1 |
$ plink -ssh -C -i "[ssh key]" [host] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
$ plink Plink: command-line connection utility Release 0.67-jp20160306 Usage: plink [options] [user@]host [command] ("host" can also be a PuTTY saved session name) Options: -V print version information and exit -pgpfp print PGP key fingerprints and exit -v show verbose messages -load sessname Load settings from saved session -ssh -telnet -rlogin -raw -serial force use of a particular protocol -P port connect to specified port -l user connect with specified username -batch disable all interactive prompts -sercfg configuration-string (e.g. 19200,8,n,1,X) Specify the serial configuration (serial only) The following options only apply to SSH connections: -pw passw login with specified password -D [listen-IP:]listen-port Dynamic SOCKS-based port forwarding -L [listen-IP:]listen-port:host:port Forward local port to remote address -R [listen-IP:]listen-port:host:port Forward remote port to local address -X -x enable / disable X11 forwarding -A -a enable / disable agent forwarding -t -T enable / disable pty allocation -1 -2 force use of particular protocol version -4 -6 force use of IPv4 or IPv6 -C enable compression -i key private key file for user authentication -noagent disable use of Pageant -agent enable use of Pageant -hostkey aa:bb:cc:... manually specify a host key (may be repeated) -m file read remote command(s) from file -s remote command is an SSH subsystem (SSH-2 only) -N don't start a shell/command (SSH-2 only) -nc host:port open tunnel in place of session (SSH-2 only) -sshlog file -sshrawlog file log protocol details to a file |
この設定を行ったら接続できるようになった。
参考サイト
http://qiita.com/moo/items/5ee3208254c34719914b