vi의 시작 시 커서 위치 저장이 안됩니다.

익명 사용자의 이미지

시작시에 커서의 위치저장이 안되는군요

기존에 에디트 했던 파일을 다시 열 경우에 작업하던 줄로 커서가 이동해야하지만 새로 vim6.0
을 설치한 이후로 안됩니다.

파일을 열면 무조건 파일 젤 앞부분에 커서가 위치하는데.. 여간 귀찮은게 아니네요..

이거 어떻게 해야 고칠 수 있을까요.. 도움 부탁 드립니다.

아래는 .vimrc 내용입니다.

####################################################################

" An example for a vimrc file.
"
" Maintainer Bram Moolenaar
" Last change 2000 Oct 14
"
" To use it, copy it to
" for Unix and OS/2 ~/.vimrc
" for Amiga s.vimrc
" for MS-DOS and Win32 $VIM\_vimrc
" for OpenVMS sys$login.vimrc

" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
colorscheme ron

set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
endif
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=999 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set keywordprg=man
" For Win32 GUI remove 't' flag from 'guioptions' no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")

" Don't use Ex mode, use Q for formatting
map Q gq

" Make p in Visual mode replace the selected text with the "" register.
vnoremap p let current_reg = @"gvdi=current_reg

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif

" Only do this part when compiled with support for autocommands.
if has("autocmd")

" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78

augroup cprog
" Remove all cprog autocommands
au!

" When starting to edit a file
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr/*,mb*,el*/,//
augroup END

augroup gzip
" Remove all gzip autocommands
au!

" Enable editing of gzipped files
" set binary mode before reading the file
" use "gzip -d", gunzip isn't always available
autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin
autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gzip -d")
autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bzip2 -d")
autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2")
autocmd FileAppendPre *.gz call GZIP_appre("gzip -d")
autocmd FileAppendPre *.bz2 call GZIP_appre("bzip2 -d")
autocmd FileAppendPost *.gz call GZIP_write("gzip")
autocmd FileAppendPost *.bz2 call GZIP_write("bzip2")

" After reading compressed file Uncompress text in buffer with "cmd"
fun! GZIP_read(cmd)
" set 'cmdheight' to two, to avoid the hit-return prompt
let ch_save = &ch
set ch=3
" when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("e")
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "'[,']w " . tmpe
" uncompress the temp file call system("gzip -d tmp.gz")
call system(acmd . " " . tmpe)
" delete the compressed lines
'[,']d
" read in the uncompressed lines "'[-1r tmp"
set nobin
execute "'[-1r " . tmp
" if buffer became empty, delete trailing blank line
if empty
normal Gdd''
endif
" delete the temp file
call delete(tmp)
let &ch = ch_save
" When uncompressed the whole buffer, do autocommands
if empty
execute "doautocmd BufReadPost " . expand("%r")
endif
endfun

" After writing compressed file Compress written file with "cmd"
fun! GZIP_write(cmd)
if rename(expand(""), expand("r")) == 0
call system(acmd . " " . expand("r"))
endif
endfun

" Before appending to compressed file Uncompress file with "cmd"
fun! GZIP_appre(cmd)
call system(acmd . " " . expand(""))
call rename(expand("r"), expand(""))
endfun

augroup END

" This is disabled, because it changes the jumplist. Can't use CTRL-O to go
" back to positions in previous files more than once.
if 0
" When editing a file, always jump to the last cursor position.
" This must be after the uncompress commands.
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" |
endif
endif

endif " has("autocmd")

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.