사용자 도구

사이트 도구


vim

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
vim [2016/12/12 07:47] – 만듦 rex8312vim [2024/03/23 02:38] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 ====== Vim ====== ====== Vim ======
- 
  
 ===== .vimrc ===== ===== .vimrc =====
  
-  set tabstop=4 shiftwidth=4 expandtab +<code vim .vimrc> 
-  set nu +call plug#begin("~/.vim/plugged"
-  set ff=unix+  Plug 'morhetz/gruvbox' 
 +  Plug 'preservim/nerdtree' 
 +call plug#end() 
 + 
 +set expandtab           " 탭을 스페이스 처리 
 +set tabstop=4           " 탭당 4개 스페이스 
 +set softtabstop=4 
 +set shiftwidth=4        " Auto indent에서 스페이스 개수 
 +set autoindent          " Auto indent 
 +set paste 
 + 
 +set nu                  " 라이번호 
 +set hlsearch            " 검색어 하이라이팅 
 +set showmatch           " 일치하는 괄호 하이라이팅 
 + 
 +set fileformat=unix 
 +set termguicolors       " 터미널 색상 개선 
 + 
 +" Grouvbox 
 +if (has("termguicolors")) 
 + set termguicolors 
 +endif 
 +set background=dark 
 +colorscheme gruvbox 
 + 
 +" NERDTree 
 +nnoremap <leader>pv :NERDTreeFind<bar> :vertical resize 45<CR> 
 +</code> 
 + 
 +<code vim .vimrc> 
 +" Python 파일일 경우 tab 설정, 폴딩설정 
 +au BufRead,BufNewFile *.py set expandtab 
 +au BufRead,BufNewFile *.py setlocal foldmethod=indent 
 +  
 +set expandtab           " 탭을 스페이스 처리 
 +set tabstop=4           " 탭당 4개 스페이스 
 +set softtabstop=4 
 +set shiftwidth=4        " Auto indent에서 스페이스 개수 
 +set autoindent          " Auto indent 
 +set paste 
 +  
 +" 백스페이스 강화 
 +set backspace=indent,eol,start 
 +  
 +set ruler               " show line and column number 
 +set showcmd             " show (partial) command in status line 
 +  
 +" Syntax Highlighting 
 +if has("syntax"
 +    syntax on 
 +endif 
 +  
 +set nu                  " 라이번호 
 +set hlsearch            " 검색어 하이라이팅 
 +set showmatch           " 일치하는 괄호 하이라이팅 
 +  
 +" Vim Color schema 
 +colorscheme jellybeans 
 +  
 +" 마지막 편집 위치 복원 기능 
 +au BufReadPost * 
 +\ if line("'\"") > 0 && line("'\"") <= line("$") | 
 +\ exe "norm g`\""
 +\ endif 
 +  
 +set laststatus=2 " 상태바 표시를 항상한다 
 +set statusline=\ %<%l:%v\ [%P]%=%a\ %h%m%r\ %F\ 
 + 
 +set termguicolors  " 터미널 색상 개선 
 +</code> 
 +===== ^M 문자 제거 ===== 
 + 
 +파일 포멧 변경 dos --> unix 
 +  set fileformat=unix 또는  set ff=unix 
 +   
 +^M 제거 명령 
 +  :%s/<Ctrl-V><Ctrl-M>//
 + 
 +  - http://stackoverflow.com/questions/811193/how-to-convert-the-m-linebreak-to-normal-linebreak-in-a-file-opened-in-vim 
 +  - http://stackoverflow.com/questions/5843495/what-does-m-character-mean-in-vim 
 + 
 +===== Neovim ===== 
 + 
 +  * https://medium.com/life-at-moka/step-up-your-game-with-neovim-62ba814166d7 
 +  * [[https://myeongjae.kim/blog/2016/10/01/vimlinux-2-neovim-%EC%84%A4%EC%B9%98%ED%95%98%EA%B3%A0-24bit-%EC%BB%AC%EB%9F%AC-%EC%A0%81%EC%9A%A9%ED%95%98%EA%B8%B0|[vim/Linux] 2. Neovim 설치하고 24bit 컬러 적용하기 
 +]]
vim.1481528844.txt.gz · 마지막으로 수정됨: (바깥 편집)