Skip to main content

Questions tagged [date-and-time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
3 answers

Insert current date into buffer

I want to insert current date into buffer. I did in my .vimrc - it works: nnoremap <F5> "=strftime("%Y%m%d %H:%M:%S %Z")<CR>P But how can I create a Vim command (e.g.: :...
Clem Fandango's user avatar
1 vote
1 answer

If I open a file using vi editor and don't edit anything, will vi editor record it as "file edited" when doing ls -ltrh?

Question same as title. I'm investigating an issue and want to know this. Plus another issue I'm looking at is is it possible to modify a file without it being reflected in ls -ltrh command output or ...
achhainsan's user avatar
1 vote
2 answers

How to get timezone using strftime command?

I have a custom command for stamping time in my log files. However, I would like that format to match the one of bash command date. For example, I use this command: :command InLog pu=strftime(\"\...
Vladimir's user avatar
1 vote
1 answer

Count time in insert mode for this project

I'm trying to code some projects in flutter by the dart language. I want to count the time that spends in insert mode to finish this project :call Startchrono() 0 : wait to go in insert mode ... ...
nextloop's user avatar
  • 123
3 votes
1 answer

Date change question: Find and replace with wildcards?

I have a file with a bunch of dates of the form a/b/c, where a,b, and c are numbers of varying character length. However, I'd like to change every instance to read c/a/b. I'm wondering if there is a ...
Zim's user avatar
  • 197
5 votes
5 answers

How do I get my signature with a date inserted in my changelog?

Whenever I make an update to the changelog of a Debian package, I have to update the signature with the correct date (well, it's not mandatory, but it's really nice to have). The signature looks like ...
Alexis Wilke's user avatar
7 votes
2 answers

How can I run a function / action every period of time (once an hour)?

I want to run So something like: if strftime("%H") < 12 set background=light else set background=dark ...
Chris Stryczynski's user avatar
3 votes
2 answers

How to save file with today's date?

I am trying to save a file with today's date as part of name. To save file, we can just do :w myFile. To get today's date, we can use strftime. Ex: :echo strftime("%F") " returns 2020-03-27. Now I ...
Iggy's user avatar
  • 175
4 votes
3 answers

How can I calculate the duration of a function call?

I have this function which insert 2 dates in a file: function MaFunction() put =strftime(\"%c\") exe 'w' exe 'call Function1()' put = strftime(\"%c\") endfunction Example: 24/03/...
Arsene Asedrith's user avatar