About: Write multiple copies of the currently edited file   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

And you need to sync the changes in this file to /var/www/mysite/index.html after each edit, or you have mounted two hosts using sshfs as: /mnt/sshfs/host0/ and /mnt/sshfs/host1/ and you'd like to simultaneously edit a file path/to/file.txt at the same location under the two directories, you can open the file src/mysite/index.html or path/to/file.txt using Vim and then before any edits, run the command: autocmd BufWritePost w! /% This will define a new command DuplicateAt which can be invoked as: DuplicateAt /path/to/duplicate/at/

AttributesValues
rdfs:label
  • Write multiple copies of the currently edited file
rdfs:comment
  • And you need to sync the changes in this file to /var/www/mysite/index.html after each edit, or you have mounted two hosts using sshfs as: /mnt/sshfs/host0/ and /mnt/sshfs/host1/ and you'd like to simultaneously edit a file path/to/file.txt at the same location under the two directories, you can open the file src/mysite/index.html or path/to/file.txt using Vim and then before any edits, run the command: autocmd BufWritePost w! /% This will define a new command DuplicateAt which can be invoked as: DuplicateAt /path/to/duplicate/at/
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 0(xsd:integer)
Category
  • File Handling
Author
  • Lonetwin
Subpage
  • /2013
Complexity
  • basic
Created
  • 2013-11-21(xsd:date)
ID
  • 0(xsd:integer)
NEXT
  • 0(xsd:integer)
abstract
  • And you need to sync the changes in this file to /var/www/mysite/index.html after each edit, or you have mounted two hosts using sshfs as: /mnt/sshfs/host0/ and /mnt/sshfs/host1/ and you'd like to simultaneously edit a file path/to/file.txt at the same location under the two directories, you can open the file src/mysite/index.html or path/to/file.txt using Vim and then before any edits, run the command: autocmd BufWritePost w! /% This will ensure that everytime you execute write the changes to the current buffer, the same changes will also be written to the path for the duplicate of the file. If you happen to need this functionality often, you can add a custom command to your vimrc, like so: command -nargs=1 -complete=dir DuplicateAt autocmd BufWritePost w! /% This will define a new command DuplicateAt which can be invoked as: DuplicateAt /path/to/duplicate/at/ After which any writes to the current buffer will also be written to the file path of the current buffer under the directory /path/to/duplicate/at/.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software