Wanna change my VIM configuration
hi!!!,
I wanna change my vim configuration so that every time i open a new file with vim saying vim 1.c ..The first few lines should be as *************************************************** * Something Here date created and las modified date and about the information of the file like no of lines etc... ************************************************* ANy help will be greatly appreciated Thanks in anticipation |
How about writing a small bash script to write the stuff with 'date' and 'wc' and so on and then putting a thing in .vimrc to append it to the top of every file. Just a thought, have never done anything like.
:) |
Here's a start:
touch create_source_file.sh && chmod 0755 create_source_file.sh then put the following in that file: Code:
#!/bin/bash |
Code:
#!/bin/sh |
You could try adding this to your .vimrc:
Code:
autocmd BufNewFile *.c 0r!new_c_file Code:
#!/bin/sh The manual suggests putting autocmd! before the autocmd line in your .vimrc, as there are apparently circumstances where the .vimrc could be sourced twice. autocmd! drops all previously set autocmds so you don't set one up twice. |
All times are GMT -5. The time now is 03:50 AM. |