{"id":3063,"date":"2021-03-09T23:33:23","date_gmt":"2021-03-09T14:33:23","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=3063"},"modified":"2021-03-10T05:35:26","modified_gmt":"2021-03-09T20:35:26","slug":"launch-the-editor-from-lv-less-on-the-pager","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2021\/03\/09\/launch-the-editor-from-lv-less-on-the-pager\/","title":{"rendered":"\u30da\u30fc\u30b8\u30e3\u30fc\u306elv, less, more\u304b\u3089\u30a8\u30c7\u30a3\u30bf\u3092\u8d77\u52d5\u3059\u308b"},"content":{"rendered":"<div class=\"paragraph\">\n<p>\u30da\u30fc\u30b8\u30e3\u30fc\u306e <code>lv<\/code> \u3067\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3066\u3044\u308b\u3068\u304d\u306b\u732b\u304c\u306a\u306b\u304b\u30ad\u30fc\u3092\u62bc\u3057\u3066vim\u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\uff0e\u3069\u3046\u3082\u4f55\u304b\u306e\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u3067 <code>lv<\/code> \u304b\u3089vim\u304c\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>man\u3092\u898b\u308b\u3068 <code>v<\/code> \u3067\u30a8\u30c7\u30a3\u30bf\u304c\u8d77\u52d5\u3059\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"openblock\">\n<div class=\"title\">man lv\u3088\u308a<\/div>\n<div class=\"content\">\n<div class=\"literalblock\">\n<div class=\"content\">\n<pre>v:     Launch the editor defined by option -E<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u305d\u3057\u3066 <code>-E<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30a8\u30c7\u30a3\u30bf\u306e\u30b3\u30de\u30f3\u30c9\u304c\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"openblock\">\n<div class=\"title\">man lv\u3088\u308a<\/div>\n<div class=\"content\">\n<div class=\"literalblock\">\n<div class=\"content\">\n<pre>-E'&lt;editor&gt;' (default 'vi -c %d')\n       Editor name (default 'vi -c %d')\n       ``%d'' means the line number of current position in a file.<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3057\u304b\u3057\uff0clv\u8d77\u52d5\u6642\u306b\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u306e\u306f\u9762\u5012\uff0e\u74b0\u5883\u5909\u6570 <code>EDITOR<\/code> \u306f\u52b9\u304f\u304b\u306a\u3068\u8a66\u3059\u3068\u52b9\u304f\u3088\u3046\u3067\u3059\uff0e\u3053\u3061\u3089\u3067\u8a2d\u5b9a\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-shell\" data-lang=\"shell\">$ EDITOR=ed lv ~\/.bashrc<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>lv\u306f\u74b0\u5883\u4f9d\u5b58\u304c\u5927\u304d\u3044\u306e\u3067\u3082\u3046\u5c11\u3057\u6c4e\u7528\u7684\u306aless\u3067\u3082\u78ba\u8a8d\u3059\u308b\u3068\u540c\u3058\u3088\u3046\u306b <code>v<\/code> \u3067vi\u304b\uff0c\u74b0\u5883\u5909\u6570 <code>EDITOR<\/code> \u3067\u6307\u5b9a\u3055\u308c\u305f\u3082\u306e\u304c\u8d77\u52d5\u3059\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"openblock\">\n<div class=\"title\">man less\u3088\u308a<\/div>\n<div class=\"content\">\n<div class=\"literalblock\">\n<div class=\"content\">\n<pre>v      Invokes an editor to edit the current file being viewed.  The editor is taken from the environment variable VISUAL if defined, or  EDITOR  if\n       VISUAL is not defined, or defaults to \"vi\" if neither VISUAL nor EDITOR is defined.  See also the discussion of LESSEDIT under the section on\n       PROMPTS below.<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"quoteblock\">\n<blockquote>\n<div class=\"paragraph\">\n<p>\u8ffd\u8a18 2021-03-10)<br \/>\nmore\u30b3\u30de\u30f3\u30c9\u3082\u540c\u69d8\u306b <code>v<\/code> \u3067\u30a8\u30c7\u30a3\u30bf\u304c\u8d77\u52d5\u3057\u307e\u3059 :)<\/p>\n<\/div>\n<div class=\"openblock\">\n<div class=\"title\">man more\u3088\u308a<\/div>\n<div class=\"content\">\n<div class=\"literalblock\">\n<div class=\"content\">\n<pre>v         Start  up an editor at current line.  The edi\u2010\n          tor is taken  from  the  environment  variable\n          VISUAL  if defined, or EDITOR if VISUAL is not\n          defined, or defaults to vi if  neither  VISUAL\n          nor EDITOR is defined.<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/blockquote>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-shell\" data-lang=\"shell\">$ dpkg-query -W lv less vim ed util-linux\ned      1.17-1\nless    551-2\nlv      4.51-8\nutil-linux      2.36.1-7\nvim     2:8.2.2434-3\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux bullseye\/sid\nRelease:        unstable\n$ uname -m\nx86_64<\/code><\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30da\u30fc\u30b8\u30e3\u30fc\u306e lv \u3067\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3066\u3044\u308b\u3068\u304d\u306b\u732b\u304c\u306a\u306b\u304b\u30ad\u30fc\u3092\u62bc\u3057\u3066vim\u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\uff0e\u3069\u3046\u3082\u4f55\u304b\u306e\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u3067 lv \u304b\u3089vim\u304c\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e man\u3092\u898b\u308b\u3068 v \u3067\u30a8\u30c7\u30a3\u30bf\u304c\u8d77\u52d5\u3059\u308b\u3088\u3046\u3067\u3059\uff0e man l [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6,199],"tags":[613,612,614],"class_list":["post-3063","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-less","tag-lv","tag-pager"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/3063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=3063"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/3063\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=3063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=3063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=3063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}