Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5608

GitHubにある自身のすべてのリポジトリの設定ページを開くのようなこと

$
0
0

GitHubの自分のリポジトリ一覧を見ていて、全部のリポジトリの設定ページを開きたくなったときにやったこと。

  1. Option + ⌘ + IでとりあえずDOMを見る
  2. .repolist-nameとればいいっぽい
  3. Option + ⌘ + Jでとりあえずコンソールを開く
GoogleChrome-DevTools-Console
Array.prototype.slice.call(document.querySelectorAll('.repolist-name a')).forEach(function(elm){console.log(elm.href+'/settings');});

ちゃんと出力された。


  1. 出力された文字列をいい感じに選択してクリップボードにコピーする
  2. とりあえずVimに貼付ける
Vim-Scratch
https://github.com/sasaplus1/sasaplus1.github.io/settings VM479:2
https://github.com/sasaplus1/stylesheetselector.js/settings VM479:2
https://github.com/sasaplus1/dotfiles/settings VM479:2
https://github.com/sasaplus1/ltsv-web/settings VM479:2
https://github.com/sasaplus1/slide-first-time-node.js/settings VM479:2
https://github.com/sasaplus1/http-router/settings VM479:2
https://github.com/sasaplus1/ltsv.js/settings VM479:2
https://github.com/sasaplus1/base62.js/settings VM479:2
https://github.com/sasaplus1/rumia/settings VM479:2
https://github.com/sasaplus1/pfmclock/settings VM479:2
https://github.com/sasaplus1/mktemp/settings VM479:2
https://github.com/sasaplus1/pfmloop/settings VM479:2
https://github.com/sasaplus1/generator-prototyping/settings VM479:2
https://github.com/sasaplus1/generator-flowtime/settings VM479:2
https://github.com/sasaplus1/dtree/settings VM479:2
https://github.com/sasaplus1/ltsview/settings VM479:2
https://github.com/sasaplus1/deepcopy.js/settings VM479:2
https://github.com/sasaplus1/split-stream/settings VM479:2

いい感じにカーソルを移動しつつ、以下のようなことをする。

  • "+P
  • :%S/ .+$//
    • eregex.vim使用
  • gg^vGI + "open "
  • ggO + "#!/bin/bash"
Vim-Scratch
#!/bin/bash

open https://github.com/sasaplus1/sasaplus1.github.io/settings
open https://github.com/sasaplus1/stylesheetselector.js/settings
open https://github.com/sasaplus1/dotfiles/settings
open https://github.com/sasaplus1/ltsv-web/settings
open https://github.com/sasaplus1/slide-first-time-node.js/settings
open https://github.com/sasaplus1/http-router/settings
open https://github.com/sasaplus1/ltsv.js/settings
open https://github.com/sasaplus1/base62.js/settings
open https://github.com/sasaplus1/rumia/settings
open https://github.com/sasaplus1/pfmclock/settings
open https://github.com/sasaplus1/mktemp/settings
open https://github.com/sasaplus1/pfmloop/settings
open https://github.com/sasaplus1/generator-prototyping/settings
open https://github.com/sasaplus1/generator-flowtime/settings
open https://github.com/sasaplus1/dtree/settings
open https://github.com/sasaplus1/ltsview/settings
open https://github.com/sasaplus1/deepcopy.js/settings
open https://github.com/sasaplus1/split-stream/settings
  • \r
    • vim-quickrun使用

Google Chromeにずばばばーっとタブが表示されました。WikiとかIssueのon/offしたかっただけです。


Viewing all articles
Browse latest Browse all 5608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>