vim hex 열기

Posted at 2010/03/12 16:43// Posted in gVim
파일을 오픈하기 전이라면
%!xxd 파일명

혹은

파일을 오픈한 다음이라면
%!xxd

다시 텍스트로 보고 싶을때는

%!xxd -r
이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/03/12 16:43 2010/03/12 16:43
Tag , ,

gVim 설정

Posted at 2007/12/30 19:12// Posted in gVim
_vimrc 수정

+ set ts=4 sts=8 sw=4 noet
sts 가 4일 경우 tab 과 스페이스가 구분이 되지 않아 포멧이 망가지는 경우가 높다.
이를 위해 tab 은 공백 8개로 해서 무조건 인덴트를 사용하도록 유도한다.

+ set diffopt+=iwhite
vim diff 기능을 사용할때 공백을 무시하는 기능이다.

*** old_vimrc   Sun Dec 30 19:23:43 2007
--- _vimrc  Sun Dec 30 19:17:55 2007
***************
*** 3,8 ****
--- 3,13 ----
  source $VIMRUNTIME/mswin.vim
  behave mswin
  
+ set ts=4 sts=8 sw=4 noet
+ set diffopt+=iwhite
+
+ map <C-F12> :ru /syntax/2*<CR>:0<CR>vG$:s/^/ /<CR>/ .<CR>:0<CR>vG$"+y:q!<CR>u
+
  set diffexpr=MyDiff()
  function MyDiff()
    let opt = '-a --binary '

mswin.vim 수정

 "cmap <C-V>       <C-R>+
C-V 기능을 작동하지 않게 해 ^I 나 ^M 등을 입력할 수 있게 한다.
*** old_mswin.vim   Sat May 12 21:09:32 2007
--- mswin.vim   Sun Dec 30 19:16:14 2007
***************
*** 35,41 ****
  map <C-V>     "+gP
  map <S-Insert>        "+gP
 
! cmap <C-V>        <C-R>+
  cmap <S-Insert>       <C-R>+
 
  " Pasting blockwise and linewise selections is not possible in Insert and
--- 35,42 ----
  map <C-V>     "+gP
  map <S-Insert>        "+gP
 
! " enable to input ^M
! "cmap <C-V>       <C-R>+
  cmap <S-Insert>       <C-R>+

ㅁㅁㅁ
이올린에 북마크하기(0) 이올린에 추천하기(0)
2007/12/30 19:12 2007/12/30 19:12
Tag ,