Skip to main content
Suggest `vim -R` as `view` may not always work.
Source Link
anishpatel
  • 173
  • 1
  • 5
viewvim -R -c 'set ft=sql' -
view -c 'set ft=sql' -
vim -R -c 'set ft=sql' -
view -c 'set ft=sql' -
  • view is an alias for vim -R, which opens Vim in read-only mode.
  • set ft is short for set filetype. As Martin TournoijMartin Tournoij mentioned in his commenthis comment, setting the file type sets the syntax and more.
view -c 'set ft=sql' -
  • view is an alias for vim -R, which opens Vim in read-only mode.
  • set ft is short for set filetype. As Martin Tournoij mentioned in his comment, setting the file type sets the syntax and more.
view -c 'set ft=sql' -
Source Link
anishpatel
  • 173
  • 1
  • 5

view -c 'set ft=sql' -
  • view is an alias for vim -R, which opens Vim in read-only mode.
  • set ft is short for set filetype. As Martin Tournoij mentioned in his comment, setting the file type sets the syntax and more.