I used the NPPExec plugin (Link to NppExec) in Notepad++. I used the following command to:
Take the current sweave(say test.rnw) file and run knitr2pdf on it. It would generate test.tex (One need's to change path to Rscript.exe accordingly)
cmd /c cd /d "$(CURRENT_DIRECTORY)" && "C:/.../bin/Rscript.exe" -e "knitr::knit2pdf('"$(NAME_PART).rnw"')
Run pdflatex to test.tex. It would generate test.pdf
pdflatex.exe -shell-escape "$$(NAME_PART).tex"
Open test.pdf in a pdfview that updates the PDF file when the new one is generated
npp_run "C:\Users\...\SumatraPDF\SumatraPDF.exe" "$(CURRENT_DIRECTORY)\$(NAME_PART).pdf"
We need to hit F6 and a window opens up. We can put the following command chunk there and save it. Rest is self explanatory.
cmd /c cd /d "$(CURRENT_DIRECTORY)" && "C:/.../bin/Rscript.exe" -e "knitr::knit2pdf('"$(NAME_PART).rnw"') pdflatex.exe -shell-escape "$$(NAME_PART).tex" npp_run "C:\Users\...\SumatraPDF\SumatraPDF.exe" "$(CURRENT_DIRECTORY)\$(NAME_PART).pdf"
References: NppExec plugin manual and NppExec plugin Help