How I run into snippets?
In this post, I will tell you how to set up the snippets and also some solution to problems…
Each time when I writing the payload of PWN in CTF, I need to tap
#!/usr/bin/env python; from pwn import *; in the top. As everyone knows, I am a very lazy man and also tired of trivial and repetive things XD. When I run into the snippets plugin vim, I just feel like I find my angel…
How to install the plugin?
- You need the plugin manager first. Personally, I use Vundle.
Please read the documentation carefully and clone to the
If you not find the .vimrc directory under ~/.vim, you can mkdir by yourself.
- Second, we need to tell .vimrc the plugin we want to install.
add lines between
Plugin 'MarcWeber/vim-addon-mw-utils' Plugin 'tomtom/tlib_vim' Plugin 'garbas/vim-snipmate' Plugin 'honza/vim-snippets' // vim default snippets
- Install them. Open the .vimrc and tap
:PluginInstallThen you can see lines of plugin :
+ plugin .... > plugin .... plugin .... plugin .... // You can see the signal at the left side, you just need to wait for seconds until it finish download
How to use?
Here is my example :
- Set up a snippets directory under
- Set up the snippets file with the name of **
- Then follwing is the file content of python.snippets :
snippet pwn #!/usr/bin/env python from pwn import *
After save it. Vim to open a file, insert
pwnand press the
Tabkey, then the content above will show on the screen <3
Are you also a lazy person? Come to enjoy it XD