"Vim"의 두 판 사이의 차이

ph
이동: 둘러보기, 검색
1번째 줄: 1번째 줄:
* auto completion in command line mode. :help wildmode  I am using <code>:set wildemode=list:longest</code>
+
==Auto completion in command line mode==
* :highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE  (from [http://vim.wikia.com/wiki/Display_line_numbers here])
+
:help wildmode   
* 이미 읽은 파일의 인코딩 변경 <code>:e ++enc=euc-kr</code> (from [http://kldp.org/node/32987 here])
+
I am using  
* tab으로 편집 :help tabpage or :help tabe
+
:set wildemode=list:longest
** <code>:Te</code>
+
 
* if you fix this options " set ic, set noic". it is somewhere sometimes teasing. when you are searching, insert '\c'(or '\C') at the end. (eg: /example\c will match with 'Example'). :help pattern
+
 
* <code>
+
 
function! GnuIndent()
+
==Display line numbers==
 +
:highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE   
 +
[http://vim.wikia.com/wiki/Display_line_numbers]
 +
 
 +
 
 +
 
 +
==이미 읽은 파일의 인코딩 변경==
 +
:e ++enc=euc-kr
 +
[http://kldp.org/node/32987]
 +
 
 +
 
 +
 
 +
==tab으로 편집==
 +
:help tabpage
 +
:help tabe
 +
ref. {{c|:Te}}
 +
 
 +
 
 +
 
 +
==temporary {{c|ic}} when searching==
 +
insert '\c'(or '\C') at the end. (eg: {{c|/example\c}} will match with 'Example').  
 +
<br>ref. {{c|:help pattern}}
 +
 
 +
 
 +
 
 +
==Gnu indent==
 +
function! GnuIndent()
 
     setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1,//0
 
     setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1,//0
 
     setlocal shiftwidth=2
 
     setlocal shiftwidth=2
 
     setlocal tabstop=8
 
     setlocal tabstop=8
endfunction
+
endfunction
au FileType c,cpp,php call GnuIndent()
+
au FileType c,cpp,php call GnuIndent()
 
</code>
 
</code>

2017년 4월 10일 (월) 10:55 판

Auto completion in command line mode

:help wildmode  

I am using

:set wildemode=list:longest


Display line numbers

:highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE  

[1]


이미 읽은 파일의 인코딩 변경

:e ++enc=euc-kr

[2]


tab으로 편집

:help tabpage
:help tabe

ref. :Te


temporary ic when searching

insert '\c'(or '\C') at the end. (eg: /example\c will match with 'Example').
ref. :help pattern


Gnu indent

function! GnuIndent()
   setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1,//0
   setlocal shiftwidth=2
   setlocal tabstop=8
endfunction
au FileType c,cpp,php call GnuIndent()