Showing posts with label Vim. Show all posts
Showing posts with label Vim. Show all posts

Preview *.html files and *.md files with vim

Previw *.html files with vim

[OS]: Ubuntu

One command line to preview html files with vim:

:w | !firefox yourfile.html %

[OS]:MacOS

the command line will be:

:w | !open yourfile.html %


Preview *.md files with vim

using vim-plug to install markdowm-previw.nvim

the command line will be:

:w | MarkdownPreview

Vim setting for python

[OS]: Ubuntu

[Path]: ~/.vimrc (create one if don't have)

here is how to config vim for python:

filetype plugin indent on
syntax on
au BufNewFile,BufRead *.py set ts=4 softtabstop=4 shiftwidth=4 expandtab=4 smarttab autoindent

and why you can't use source ~/.vimrc in your terminal after you finished configuration.