Loading ...
Sorry, an error occurred while loading the content.

_vimrc woes

Expand Messages
  • jkilbour@pol.net
    I moved my _vimrc over to my laptop, and now there is a backup problem. I commented out what I thought were the offending lines in the _vimrc, but it didn t
    Message 1 of 2 , Dec 28, 2005
    • 0 Attachment
      I moved my _vimrc over to my laptop, and now there is a backup problem. I
      commented out what I thought were the offending lines
      in the _vimrc, but it didn't help, even after I overrode, saved and
      sourced the _vimrc with the commented lines When I save the _vimrc, I get
      a message at the bottom of the screen that flashes momentarily:

      "_vimrc" E510 Can't make backup file. (add ! to override)

      I get the same message (different filename) when trying to save a
      different file, but I have to press Enter to continue.

      Here is my _vimrc, with the newly commented lines at the end:
      set nocompatible
      "source $VIMRUNTIME/vimrc_example.vim
      source $VIMRUNTIME/mswin.vim
      behave mswin

      " UPDATE/RELOAD_vimrc
      :nmap ,s :source $VIM/_vimrc
      :nmap ,v :sp $VIM/_vimrc
      "automatically restart vim after changing vimrc
      autocmd! bufwritepost _vimrc source %

      "for multi-line abbreviation http://www.vim.org/tips/tip.php?tip_id=966

      "searching
      set ignorecase
      set showmatch
      set nohls
      set wrapscan

      set wrap
      set tw=0
      set list listchars=tab:\ \ ,eol:ΒΆ display=lastline

      " use indents of 3 spaces, and have them copied down lines:
      set ts=3
      set shiftwidth=3
      set shiftround
      set expandtab
      set autoindent
      set smartindent

      set backspace=2
      set splitbelow

      set nu
      " whichwrap: Allow jump commands for left/right motion to wrap to
      " previous/next line when cursor is on first/last character in the line:
      set whichwrap=<,>,h,l,[,]

      filetype plugin on

      "Get the full filetypes syntax menu
      if has("gui_running") && has("menu")
      let do_syntax_sel_menu = 1
      autocmd VimEnter * map {lhs} {rhs}
      endif

      filetype on " enable filetype detection:

      if has("gui_running")
      set guifont=Fixedsys:h9:cANSI
      endif
      colorscheme peachpuff

      " Automatically change working directory to the directory the current file.
      autocmd BufEnter * cd %:p:h

      :abbr bbb BEGIN{FS="<Bar>"}

      "maps jj to esc, taking you out of insert mode
      ino jj <ESC>

      "splits window horizontally to new file, mapped to <c-n><c-n>
      nnoremap <c-n><c-n> <c-w>n

      "selects text in visual mode as in MSWIN
      noremap <M-LeftMouse> <LeftMouse><Esc><C-V>
      noremap <M-LeftDrag> <LeftDrag>

      map ; :

      " display the current mode and partially-typed commands in the status line:
      set statusline=%<%f\ %y%h%m%r%=%l,%c\ \ \ \ %P\ %{strftime('%H:%M')}
      "set statusline=%<%f%h%m%r%=%{&ff}\ %l,%c%V\ %P "shows fileformat

      set showmode
      set showcmd
      set showmatch " show matching brackets

      set showbreak=+ " String to put at the start of lines that have
      been wrapped

      set splitbelow " splitbelow: Create new window below current one.
      set showcmd " show command-in-progress
      set laststatus=2 " always show status line
      set enc=utf-8
      set shortmess=at " shortens messages to avoid 'press a key' prompt
      "set backupdir =C:\Vim\Temp\vim_backups
      "set dir=C:\temp
      "set nobackup " don't create those annoying ~ files
    • jkilbour@pol.net
      ... I think I solved it by restarting Vim, and moving items into my _vimrc one-by-one. Everytime I migrate my _vimrc, I understand it a little better.
      Message 2 of 2 , Dec 29, 2005
      • 0 Attachment
        > I moved my _vimrc over to my laptop, and now there is a backup problem.
        > I commented out what I thought were the offending lines
        > in the _vimrc, but it didn't help, even after I overrode, saved and
        > sourced the _vimrc with the commented lines When I save the _vimrc, I
        > get a message at the bottom of the screen that flashes momentarily:
        >
        > "_vimrc" E510 Can't make backup file. (add ! to override)
        >
        > I get the same message (different filename) when trying to save a
        > different file, but I have to press Enter to continue.


        I think I solved it by restarting Vim, and moving items into my _vimrc
        one-by-one. Everytime I migrate my _vimrc, I understand it a little
        better.
      Your message has been successfully submitted and would be delivered to recipients shortly.