My init.vim code:
autocmd BufNewFile *.cpp 0r C:\Users\User\Desktop\cp\Template.cpp
When i create a .cpp
file, Template.cpp
code is imported in that cpp file.
upto this point, everything is fine.
but while doing that, vim always leaves a last blank line (which i don't want)
#include <iostream>
using namespace std;
int main(){
// code goes here
}
-- unwanted last line --
So can anyone help me fix this problem?