镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

man git-init show NAAMMEE like ugly strings #198

Open

Description

@lambdalisue

Minimum vimrc

" vim -u ~/vimrc.min
set nocompatible
set runtimepath&

let s:required_plugins = [
      \ expand('~/.vim/bundle/vimproc.vim'),
      \ expand('~/.vim/bundle/vimshell.vim'),
      \]
for s:required_plugin in s:required_plugins
  execute printf('set runtimepath+=%s', s:required_plugin)
endfor

Procedure

  1. vim -u ~/vimrc.min
  2. Hit :VimShell
  3. Run man git-init

Result

NAAMMEE
       git-init - Create an empty Git repository or reinitialize an existing one

SYYNNOOPPSSIISS
       _g_i_t _i_n_i_t [-q | --quiet] [--bare] [--template=<template_directory>]
                 [--separate-git-dir <git dir>]
                 [--shared[=<permissions>]] [directory]


DEESSCCRRIIPPTTIIOONN
       This command creates an empty Git repository - basically a .git directory with subdirectories for
       objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the
       master branch is also created.

       If the $GIT_DIR environment variable is set then it specifies a path to use instead of ./.git for the
       base of the repository.

       If the object storage directory is specified via the $GIT_OBJECT_DIRECTORY environment variable then the
       sha1 directories are created underneath - otherwise the default $GIT_DIR/objects directory is used.

       Running _g_i_t _i_n_i_t in an existing repository is safe. It will not overwrite things that are already there.
       The primary reason for rerunning _g_i_t _i_n_i_t is to pick up newly added templates (or to move the repository
       to another place if --separate-git-dir is given).

...

vim version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec  9 2014 17:36:40)
Included patches: 1-488
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +cindent         +conceal         +digraphs        +farsi           +gettext         +libcall         +mksession       +mouse_netterm   -mzscheme        +profile         +scrollbind      +syntax          +textobjects     +visualextra     +X11
+arabic          +clientserver    +cryptv          +dnd             +file_in_path    -hangul_input    +linebreak       +modify_fname    +mouse_sgr       +netbeans_intg   +python          +signs           +tag_binary      +title           +viminfo         -xfontset
+autocmd         +clipboard       +cscope          -ebcdic          +find_in_path    +iconv           +lispindent      +mouse           -mouse_sysmouse  +path_extra      -python3         +smartindent     +tag_old_static  +toolbar         +vreplace        +xim
+balloon_eval    +cmdline_compl   +cursorbind      +emacs_tags      +float           +insert_expand   +listcmds        +mouseshape      +mouse_urxvt     +perl            +quickfix        -sniff           -tag_any_white   +user_commands   +wildignore      +xsmp_interact
+browse          +cmdline_hist    +cursorshape     +eval            +folding         +jumplist        +localmap        +mouse_dec       +mouse_xterm     +persistent_undo +reltime         +startuptime     +tcl             +vertsplit       +wildmenu        +xterm_clipboard
++builtin_terms  +cmdline_info    +dialog_con_gui  +ex_extra        -footer          +keymap          +lua             +mouse_gpm       +multi_byte      +postscript      +rightleft       +statusline      +terminfo        +virtualedit     +windows         -xterm_save
+byte_offset     +comments        +diff            +extra_search    +fork()          +langmap         +menu            -mouse_jsbterm   +multi_lang      +printer         +ruby            -sun_workshop    +termresponse    +visual          +writebackup     +xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"

...

Activity

  1. voondo commented on Aug 28, 2015

    @voondo

    FYI, I cannot reproduce this on a recent neovim

  2. Shougo commented on Aug 29, 2015

    @Shougo
    Owner

    Yes, it is well known problem.
    It is hard to fix...

  3. lambdalisue commented on Aug 29, 2015

    @lambdalisue
    Author

    Can't you just emulate the behaviour of backspace? I could successfully show manpage with removing ^H and character before the ^H with this code in my plugin

  4. lambdalisue commented on Aug 29, 2015

    @lambdalisue
    Author

    The code didn't show ^H in github... The correct one would be

    function! s:remove_backspaces() abort " {{{
      let saved_pos = getpos('.')
      :%s/.^H//ge
      keepjump call setpos('.', saved_pos)
    endfunction " }}}

    ^H is typed as Ctrl-v h so Copy & Paste won't work.

  5. Shougo commented on Aug 30, 2015

    @Shougo
    Owner

    @lambdalisue Pull request is wellcome.

  6. Shougo commented on Aug 30, 2015

    @Shougo
    Owner

    Can't you just emulate the behaviour of backspace? I could successfully show manpage with removing ^H and character before the ^H with this code in my plugin

    The emulation code is already available in s:control.delete_backward_char().

  7. lambdalisue commented on Aug 30, 2015

    @lambdalisue
    Author

    @lambdalisue Pull request is wellcome.

    👍

    The emulation code is already available in s:control.delete_backward_char().

    Hum...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions