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

Re: Locking VIM files ...-follow up with still more issues

Expand Messages
  • drchip@campbellfamily.biz
    ... If you want an action to occur for every file in some directory, you should use autocmds. As a related example, consider ebcdic encoding: editing
    Message 1 of 2 , Jun 1, 2005
    • 0 Attachment
      Quoting Varun Gupta <gpta_varun@...>:

      > Thnx a lot sir for your response. But this requires
      > setting the password individually for each file . Is
      > there a way by which , auto encryption works for each
      > file in the folder (I just need to specify the
      > directory).

      If you want an action to occur for every file in some
      directory, you should use autocmds. As a related example,
      consider ebcdic encoding:

      " editing EBCDIC {{{2
      augroup EBCDIC
      au!
      au BufReadPre */EBCDIC/* :let g:binkeep= &bin|set bin
      "au BufReadPost */EBCDIC/* :%!iconv -f EBCDIC-US
      au BufReadPost */EBCDIC/* :%!dd conv=ascii
      au BufReadPost */EBCDIC/* :let &bin= g:binkeep|unlet g:binkeep
      "au BufWritePre */EBCDIC/* :let g:binkeep= &bin|set bin|%!iconv -t EBCDIC-US
      au BufWritePre */EBCDIC/* :let g:binkeep= &bin|set bin|%!dd conv=ebcdic
      au BufWritePost */EBCDIC/* :let &bin= g:binkeep|unlet g:binkeep
      augroup END

      This set of commands assumes all files in EBCDIC/ or below are encoded
      in ebcdic, but need to be converted to and from ascii for viewing. Obviously
      you can change this to be whatever directory you wish and change the ebcdic
      to/from ascii conversion to be encryption/decryption s/w (such as pgp provides).
      Pgp is likely to be a stronger encryption than Vim provides, by the way.

      Regards,
      Chip Campbell
    Your message has been successfully submitted and would be delivered to recipients shortly.