Also, I found that I need to add one line to my .vimEncrypt, if I want to have working Insert button, arrow keys during insert, delete etc. :
autocmd BufReadPre,FileReadPre * set nocompatible
I don't know exactly how it works, I figure that nocompatible option that is automatically run on vim startup fixes a working directory problem or something.
Nice encryption method, replaced my openssl script with this, easier and much more secure.
]]>set viminfo=
to your .vimencrypt file otherwise data from your encryted file can end up written in your .viminfo file. I'm not sure that you need to set noswapfile as I believe that the data passed to this file is still encrypted (but better safe than sorry).
]]>Thanks for the tip, anyway.
]]>?? Aliases don't take parameters.
The $1 is filed in when .bashrc is parsed due to the double quotes around the alias.
The alias still works because only 'vime' is replaced with the alias string ending now with the '-x '.
If you put single quotes around the alias this would fail as the $1 would not be filed until the command is executed.
The "$1" should just be removed. It won't cause any harm as long as no parameter is pased to .bashrc, but if one ever is passed (somehow) then it will cause a problem.
edit: It looks like Jasonwryan's .bashrc does receive a parameter. Now I'm curious how.
<facepalm> ... your right... so used to writing functions for my .bashrc anymore and not alias's i totally missed that.... fixed original post AND my .bashrc . Thank you.
]]>$ echo $1
$ set bell-style visible
$ echo $1
bell-style
$ echo $1
bell-style
$ echo this is a test
this is a test
$ echo $1
bell-style
$ set novar blah
$ echo $1
novar
Intersting. Set, seems to leave it's first parameter in $1 after it is done.
]]>The $1 is filed in when .bashrc is parsed due to the double quotes around the alias.
The alias still works because only 'vime' is replaced with the alias string ending now with the '-x '.
If you put single quotes around the alias this would fail as the $1 would not be filed until the command is executed.
The "$1" should just be removed. It won't cause any harm as long as no parameter is pased to .bashrc, but if one ever is passed (somehow) then it will cause a problem.
edit: It looks like Jasonwryan's .bashrc does receive a parameter. Now I'm curious how.
]]>$1 represents the name of your file...
vime nameofyourfile.txt
the alias is then translated literally into:
vim -u ~/.vimencrypt -x nameofyourfile.txt
In an alias?
$ alias foo="echo $1 '|' "
$ foo bar
| bar
Thanks - a nice little tool.
]]>What's the "$1" in the alias? That is a parameter passed to bashrc, there shouldn't be any.
In this particular context, $1 represents the name of your file... it can be used in many shell scripts/alias's etc, not sure where you got the above information. $1 means the first argument.
vime nameofyourfile.txt
the alias is then translated literally into:
vim -u ~/.vimencrypt -x nameofyourfile.txt
~~ Edit ... removed the $1 --- DOH, thanks Trilby. FWIW, $1 is used in functions in your .bashrc, and NOT alias's...
]]>Most vim users I know, have their own defaults set in .vimrc (why it's included, obviously it wouldn't HAVE to be included).
The .vimencrypt and vime are simply for encrypted files, and keeping them separated from .vimrc makes it easy to safely encrypt.
Besides, isn't the whole point of encryption with vim that you can edit encrypted files easily... with your favorite text editor and settings?
]]>There is a REASON that there is a separate file for "vime". Put what ever else you "think" you need in that file... however, the less the better.
You "could" just type "vime something.txt" ...... save and close the file, and reopen with normal VIM (which would load your normal vim profile information) so things would work "normally".
]]>