2

I have a question on creating templates on vim-LaTeX suite.
I placed a template file on

/usr/share/vim/addons/ftplugin/latex-suite/templates/

with the content of

<+      +>      !comp!  !exe!
%        File: !comp!expand("%:p:t")!comp!
%     Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp!
% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp!
%
\documentclass[a4paper]{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\graphicspath{{<++>}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\norm}[1]{\lVert#1\rVert}
\begin{document}
\lhead{<++>}
\rhead{<++>}
\cfoot{\thepage}
<++>
\end{document}

Then I created the soft link of it in directory:

/var/lib/vim/addons/ftplugin/latex-suite/templates/

If everything goes well, when create a new tex file on vim and type

:TTemplate

on the command line, I should be getting:
File with file name,
Created with date and time of creation
Last Change with date and time of when the last change was made.
and starting cursor should be on \lhead{ cursor here }

However, it seems that it won't show up any vim-formatted dates and initial position of the cursor doesn't be on where I want it to be.

Is there any solution to this problem?

I am using ubuntu 14.04, vim-latex suit.
Thank in advance.

  • may be I should be asking on ubuntu stack exchange, but hopefully someone nice will be answering this question on Latex stack exchange. – Tom Mar 2 '15 at 5:45
  • I will be deleting this post in two hours. If you have an answer, please answer to the post on stackoverflow – Tom Mar 4 '15 at 0:06
0

Turns out, spaces were tabs, not spaces.
My post on stackoverflow has more information. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.