IT

Vim이 내 코드를 래핑하는 것을 막을 수없는 이유는 무엇입니까?

lottoking 2020. 8. 27. 21:46
반응형

Vim이 내 코드를 래핑하는 것을 막을 수없는 이유는 무엇입니까?


vim이 Python 코드를 래핑하는 것을 막을 수 없습니다. 내가 :set nowrap챔피언처럼 들어가면 그래도 랩핑.

J코드의 분할 된 줄을 통합하기 위해 치면 실제 캐리지 리턴이 삽입 된 것입니다. 나는 그것을 막는 이유와 방법을 수 없습니다.


'textwidth' 'tw'        number  (default 0)
                        local to buffer
                        {not in Vi}
        Maximum width of text that is being inserted.  A longer line will be
        broken after white space to get this width.  A zero value disables
        this.  'textwidth' is set to 0 when the 'paste' option is set.  When
        'textwidth' is zero, 'wrapmargin' may be used.  See also
        'formatoptions' and |ins-textwidth|.
        When 'formatexpr' is set it will be used to break the line.
        NOTE: This option is set to 0 when 'compatible' is set.


'wrapmargin' 'wm'       number  (default 0) 
                        local to buffer
        Number of characters from the right window border where wrapping
        starts.  When typing text beyond this limit, an <EOL> will be inserted
        and inserting continues on the next line.
        Options that add a margin, such as 'number' and 'foldcolumn', cause
        the text width to be further reduced.  This is Vi compatible.
        When 'textwidth' is non-zero, this option is not used. 
        See also 'formatoptions' and |ins-textwidth|.  {Vi: works differently
        and less usefully}

긴 줄 자동 줄 바꿈을 참조하면 다음 줄로 보내십시오.

:set textwidth=0 
:set wrapmargin=0

다른 답변 중 어느 것도 나를 위해 일하지 않을 수 있습니다 (IDK 이유).

:set wrap! 나를 위해 트릭을 수행했습니다 (Windows 용 GVim 사용).


set formatoptions-=t트릭을해야합니다. set formatoptions+=t자동 줄 바꿈을 다시하겠습니다.

로 할 수있는 작업에 대한 자세한 내용 은 문서를formatoptions 참조하십시오 .


vim이 긴 줄을 사용하는 것을 방지하기 위해 다음 두 줄을 사용합니다 .vimrc.

set nowrap           " do not automatically wrap on load
set formatoptions-=t " do not automatically wrap text when typing

줄 바꿈을 선택하여이 :set wrap!명령을 ~/.vimrc.


설정 한 텍스트 너비 일 수 및 특정 길이에 도달하면 자동으로 줄을 끈다.

:set tw=0

그것이 실패하면 예를 들어

:set wrap linebreak textwidth=0 

:set virtualedit=insert

빔은 VI-mode 호환 여야 합니다 .


vimrc_example.vim (예, Vim74의 파일)을 textwidth = 0을 설정합니다.

참고 URL : https://stackoverflow.com/questions/1290285/why-cant-i-stop-vim-from-wrapping-my-code

반응형