프로그램 사용/vi2014. 9. 11. 14:02
ctrl-v를 누르면 사각형
v는 시작부터 끝을 선택하는 타입

set mouse=a를 설정해서 사용할 경우에는
키보드를 통한 박스 선택을 하듯 할 수 없다

2. Starting and stopping Visual mode                    *visual-start*

                                                *v* *characterwise-visual*
v                       start Visual mode per character.

                                                *V* *linewise-visual*
V                       start Visual mode linewise.

                                                *CTRL-V* *blockwise-visual*
CTRL-V                  start Visual mode blockwise.  Note: Under Windows
                        CTRL-V could be mapped to paste text, it doesn't work
                        to start Visual mode then, see |CTRL-V-alternative|.

If you use <Esc>, click the left mouse button or use any command that
does a jump to another buffer while in Visual mode, the highlighting stops
and no text is affected.  Also when you hit "v" in characterwise Visual mode,
"CTRL-V" in blockwise Visual mode or "V" in linewise Visual mode.  If you hit
CTRL-Z the highlighting stops and the editor is suspended or a new shell is
started |CTRL-Z|.

              new mode after typing:            *v_v* *v_CTRL-V* *v_V*
old mode             "v"              "CTRL-V"               "V"        ~

Normal              Visual         blockwise Visual       linewise Visual
Visual              Normal         blockwise Visual       linewise Visual
blockwise Visual    Visual         Normal                 linewise Visual
linewise Visual     Visual         blockwise Visual       Normal 


[링크 : http://mwultong.blogspot.com/2006/11/vim-vi-select-copy-paste.html]

'프로그램 사용 > vi' 카테고리의 다른 글

vi 버전 차이?  (0) 2016.07.09
vi 문자열 치환  (0) 2015.08.04
vi 유용한 플러그인 - F12 mouse 토글  (0) 2014.09.05
vi를 source insight 처럼 설정하기  (0) 2014.09.04
vi에서 마우스 사용하도록 설정하기  (0) 2014.09.04
Posted by 구차니
Ubuntu 10.04 LTS에서 테스트 완료

function svn {
  command svn "$@" | awk '
  BEGIN {
    cpt_c=0;
  }
  {
    if        ($1=="C") {
      cpt_c=cpt_c+1;
      print "\033[31m" $0 "\033[00m";  # Conflicts are displayed in red
    }
    else if   ($1=="A") {
      print "\033[32m" $0 "\033[00m";  # Add in green
    }
    else if   ($1=="?") {
      print "\033[36m" $0 "\033[00m";  # New in cyan
    }
    else if   ($1=="D") {
      print "\033[35m" $0 "\033[00m";  # Delete in magenta
    }
    else                {
      print $0;                        # No color, just print the line
    }
  }
  END {
    print cpt_c, " conflicts are found.";
  }';
} 

[링크 : http://stackoverflow.com/questions/8786400/svn-add-colors-on-command-line-svn-with-awk-in-bash]



\e[00m"

00에 숫자가 들어가면 된다.
30대는 foreground color
40대는 background color 를 지칭하고

1~7은 아래의 색상값을 가지게 된다.


[링크 : http://en.wikipedia.org/wiki/ANSI_escape_code]
[링크 : http://sunyzero.egloos.com/viewer/4282610]
+
svn ci 할때 뭔가 에러가 발생하는 기분이니 확인필요 
Posted by 구차니
프로그램 사용/vi2014. 9. 5. 10:51
source insight 처럼 vi 설정하다 보니 거의 필수(?) 인 녀석
마우스를 사용가능하도록 해주는 건데
F12를 누르면 toggle 형태로 작동하게 된다.

[링크 : https://github.com/nvie/vim-togglemouse] F12로 마우스 토글
    [링크 : http://nvie.com/posts/how-i-boosted-my-vim/

'프로그램 사용 > vi' 카테고리의 다른 글

vi 문자열 치환  (0) 2015.08.04
vi 사각형 선택하기  (0) 2014.09.11
vi를 source insight 처럼 설정하기  (0) 2014.09.04
vi에서 마우스 사용하도록 설정하기  (0) 2014.09.04
vi를 IDE 처럼 사용하기  (0) 2014.09.04
Posted by 구차니
프로그램 사용/vi2014. 9. 4. 23:20
이거 대로 설정하면 아쉬운대로 source insight 급으로 쓸수 있다는데..
회사에서도 이렇게 설정해서 쓰는 분이 계시는듯 한데..
직접 해보고 익숙해 지기 전까지는 아무래도.. 힘들듯..

[링크 : http://brucekim.egloos.com/viewer/3389981]
    [링크 : http://swbae98.wordpress.com/2011/08/04/vim-like-source-insight/]
[링크 : http://tactlee.egloos.com/viewer/1454652] 소스 인사이트에서 gvim을 편집기로 연결하기


plugin

Trinity가 메인 (내부에 NERDTree 내장)
아래의 4개를 풀면 된다. 단, Trinity 는 Trinity - plugin - trinity.vim 식으로 존재하니
.vim/plugin/Trinity/plugin/trinity.vim 이 되도록 넣어 주어야 한다.

[링크 : http://www.vim.org/scripts/script.php?script_id=2347] Trinity - Source Explorer / NERD Tree / Taglist 관리
[링크 : http://www.vim.org/scripts/script.php?script_id=2179] Source Explorer (Context Window)
[링크 : http://www.vim.org/scripts/script.php?script_id=273] taglist
[링크 : http://www.vim.org/scripts/script.php?script_id=159] minibufbrowser
[링크 : https://github.com/nvie/vim-togglemouse] F12로 마우스 토글

그리고 .vimrc에서
nmap <F5> :TlistToggle<CR>
nmap <F7> :NERDTreeToggle<CR>
nmap <F8> :SrcExplToggle<CR> 
nmap <F9> :TrinityToggleAll<CR> 

4개를 설정해주면 간단하게 사용!
F5는 태그리스트
F7은 파일 브라우저
F8은 컨텍스트
F9는 전체를 끄고 켜는 기능이다. 


[링크 : http://vim-taglist.sourceforge.net/]
[링크 : http://www.vim.org/scripts/script.php?script_id=3252]  

'프로그램 사용 > vi' 카테고리의 다른 글

vi 사각형 선택하기  (0) 2014.09.11
vi 유용한 플러그인 - F12 mouse 토글  (0) 2014.09.05
vi에서 마우스 사용하도록 설정하기  (0) 2014.09.04
vi를 IDE 처럼 사용하기  (0) 2014.09.04
vi 에서 탐색기(?)  (0) 2014.08.26
Posted by 구차니
프로그램 사용/vi2014. 9. 4. 15:02
putty + vi 에서도 마우스가 사용이 가능하다!
마우스를 쓸수 있으면 좋은점은...
창 관리가 쉽다는거?

단, putty에서 마우스를 활성화 하면
putty 자체의 기능인 드래그 복사가 안되니 주의!

                        VIM - main help file
                                                                         k
      Move around:  Use the cursor keys, or "h" to go left,            h   l
                    "j" to go down, "k" to go up, "l" to go right.       j
Close this window:  Use ":q<Enter>".
   Get out of Vim:  Use ":qa!<Enter>" (careful, all changes are lost!).

Jump to a subject:  Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
   With the mouse:  ":set mouse=a" to enable the mouse (in xterm or GUI).
                    Double-click the left mouse button on a tag, e.g. |bars|.
        Jump back:  Type CTRL-T or CTRL-O (repeat to go further back).

Get specific help:  It is possible to go directly to whatever you want help
                    on, by giving an argument to the |:help| command.
                    It is possible to further specify the context:
                                                        *help-context*
                          WHAT                  PREPEND    EXAMPLE      ~
                      Normal mode command      (nothing)   :help x
                      Visual mode command         v_       :help v_u
                      Insert mode command         i_       :help i_<Esc>
                      Command-line command        :        :help :quit
                      Command-line editing        c_       :help c_<Del>
                      Vim command argument        -        :help -r
                      Option                      '        :help 'textwidth'
  Search for help:  Type ":help word", then hit CTRL-D to see matching
                    help entries for "word". 

Enable vim automatic visual mode using mouse
:set mouse=a

Disable vim automatic visual mode using mouse
:set mouse-=a
 
[링크 : http://yard.tistory.com/entry/vi에서-Mouse마우스-컨트롤-설정해제

Posted by 구차니
프로그램 사용/vi2014. 9. 4. 14:32
vi 플러그인 모음

[링크 : http://vim.wikia.com/wiki/Use_Vim_like_an_IDE]
Posted by 구차니
ubuntu 에서도 적용됨(10.04 LTS)

$ vi /etc/ssh/sshd_config
 UseDNS no

[링크 : http://server.tistory.com/144]
[링크 : http://kiin.wordpress.com/2012/02/21/how-to-decrease-ssh-connection-time-on-centos/


'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh X11 forwarding 속도 향상  (0) 2015.09.24
sshd server key 경로  (0) 2015.01.06
ssh X11 forwarding 옵션  (0) 2012.01.25
ssh X11 터널링  (0) 2012.01.24
scp 사용하기  (0) 2011.04.18
Posted by 구차니
약간 오래된(?) 문서로
2013년 작성된건데.. 전반적으로 vmware의 성능 승리이다.

[링크 : http://xmodulo.com/2013/07/vmware-player-vs-virtualbox-performance-comparison.html]

vmware player도 배포를 제외하면 
개발용으로 회사에서 써도 되는 것으로 생각되니
vmware player / virtualvbox 중에서 적당히 골라 쓰면 될 듯
[링크 : http://www.2cpu.co.kr/bbs/board.php?bo_table=freeboard_2011&wr_id=73967]
Posted by 구차니

virtualbox 에서 호스트에서만 접속을 허용할 경우 라던가. 아무튼
외부와의 접점이 필요할 경우 사용한 방법으로 NAT port forward라는게 있다.

Step 1. 리눅스 내의 아이피 확인(DHCP 라면 고정하는게 편하다)


Step 2. virtualBox의 해당 가상머신 설정에서 네트워크 - 어댑터 - 고급 - "포트 포워딩"


Step 3. 아래와 같이 입력한다.
호스트는 현재 사용중인 실체/물리 PC를 뜻하니 
컴퓨터의 ip를 적거나 가장 편하게(!) 127.0.0.1로 설정한다(localhost라고 입력은 아예 못하게 ip 타입으로 입력 받는다)



음.. 단순화 시키면
호스트 아이피는 127.0.0.1로 고정하고
호스트 포트는 외부 포트
게스트 IP는 포워딩 할 IP
게스트 포트는 포워딩 할 포트로 생각해서 일반적인 공유기 설정하듯 쓰면 된다.



아래는 설정에 참고한 Virtualbox 도움말

To forward all incoming traffic from a specific host interface to the guest, specify the IP of that host interface like this:

VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,127.0.0.1,2222,,22"

This forwards all TCP traffic arriving on the localhost interface (127.0.0.1) via port 2222 to port 22 in the guest.

Posted by 구차니
프로그램 사용/vi2014. 8. 26. 10:21
파일 목록을 탐색한다는 의미로 Explorer의 E인듯

:E
:Ve
:Se

[링크 : http://vimcasts.org/episodes/the-file-explorer/]
[링크 : http://k.daum.net/qna/view.html?qid=3wQp7]
Posted by 구차니