diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index 3437f8f5..0c750f8f 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -87,6 +87,7 @@ // runtime/syntax/php.micro // runtime/syntax/pkg-config.micro // runtime/syntax/po.micro +// runtime/syntax/pony.micro // runtime/syntax/pov.micro // runtime/syntax/privoxy-action.micro // runtime/syntax/privoxy-config.micro @@ -464,7 +465,7 @@ func runtimeHelpKeybindingsMd() (*asset, error) { return a, nil } -var _runtimeHelpOptionsMd = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x58\x5f\x8f\xdc\xb6\x11\x7f\x3e\x7d\x8a\xc1\x39\xc0\xf9\x8c\x3d\x9d\x91\xfa\x21\xd8\xb7\x6b\xdd\x5e\x0c\xd4\x71\xd0\xf8\x21\x41\x51\x84\x23\x69\xb4\x62\x4d\x91\x2a\x49\xed\x7a\x1d\xb8\x9f\xbd\x98\x21\xb5\xd2\xee\x29\xd7\xbc\xad\xf8\xe7\x37\xc3\xdf\xfc\xdf\x17\x2f\x5e\xc0\x87\x21\x6a\x67\x43\x51\xbc\xd7\xb5\x77\x10\xa2\xf3\x14\x00\x8d\x01\xd7\x42\xec\x08\xc6\x40\x1e\x6a\x67\x5b\xbd\x1b\x3d\xf2\x61\xd0\x16\x74\x0c\x17\x8b\x8d\xf6\x54\x47\xe7\x8f\xe5\x84\x35\x06\x0a\x02\xa1\xbe\xf9\xf9\xed\xe3\xaf\x7f\xf9\xf0\xc3\xdf\xde\x3d\xfe\xfa\xfd\x87\xf7\x7f\xbd\xef\xf9\x80\x02\x4c\xfb\xbf\x07\x04\x0f\x01\x06\xf2\x05\x9f\xf9\xf9\xed\x23\x84\x81\xea\x0d\xe8\xf6\x29\xa0\x02\x1d\xc0\xba\x08\x81\xe2\x06\xd4\x7f\xef\xcb\x84\x39\x09\xd2\x81\xb5\x69\x58\x60\x31\x4b\x3c\xd3\xf9\x7b\xf2\x04\xe8\x49\x34\x72\x89\x15\x88\x1d\x46\x38\xba\x11\x6a\xb4\x8c\xbd\x2d\x8a\x57\xa0\x6a\x67\x9c\x0f\x75\x47\x3d\xa9\x2d\x18\x87\xcd\xf4\x8e\xd3\x7a\x22\xb2\x61\xaa\x0a\x00\xf8\xe6\x65\x92\xf8\x56\xfb\xdb\xfb\xc5\xb1\x70\xaf\x92\x28\x55\x8a\xa6\x7c\xf6\x63\xa7\x03\xcb\x8a\xda\xee\x58\x71\xb5\x33\xae\x42\x03\xce\x9a\xa3\x2a\x8b\xe2\xaa\xa1\x16\x47\x13\x61\x8f\x66\xa4\x2d\xa8\xfc\xad\x8a\xab\x1f\x5c\xa4\xa4\x33\xab\x33\x9d\x5b\xca\x83\x97\x79\x75\x03\xc1\x19\xf4\xfa\x0b\x35\x1b\x40\xdb\xcc\x9f\x77\xb1\xbe\x2d\xae\x98\x09\x26\xd4\xb8\x1a\x63\x7a\xc8\xe9\x09\x1b\xa8\xa8\xc6\x31\x08\x57\x47\x21\x8d\xfa\x8a\x9a\x26\x9d\x63\xd9\xf2\x1a\xa8\xb4\x45\x21\xf7\xea\xe3\x05\x3d\xcc\x67\x45\x10\xc8\x50\xcd\xf0\xad\x77\xbd\x78\x1d\x5f\x6e\xb5\xa1\x30\x21\x15\x57\x17\xd6\x3c\xe7\x6f\xe9\x2e\xc9\xed\x6a\xc7\xef\xac\x8e\xa7\xf7\x1f\x74\xec\x20\x76\x9e\xa8\xb8\x5a\xde\xdd\x16\x4c\x37\xfc\x92\xcd\xeb\x09\x1b\xe8\x1d\x7b\x41\xe5\xc6\x98\x9e\x70\x13\xce\xe9\xcb\x4a\x65\x17\x50\xd0\x91\x19\x20\xba\x41\xd7\x82\xf5\x52\xc9\x42\xde\xbd\x2d\x67\x77\xa9\x9d\x19\x7b\xab\xb6\xec\xbe\x91\x2d\x3c\x3b\x2c\x44\x07\xaf\x37\xa0\x59\x53\x63\xa0\xd1\x61\x30\x78\x04\x84\x74\x07\xb2\x39\xd9\xfb\x75\xab\xa9\x61\x49\x69\xab\x4c\xce\x92\xbc\xbb\x1d\x0d\x83\xb3\xb7\x1e\xd0\xc6\xe9\xf6\x77\xaf\x19\xbf\x22\xe8\xf4\xae\x33\x7a\xd7\x31\xdd\x82\x85\x06\x5a\xe7\x81\x3e\x63\x3f\x18\x5a\xf3\xac\xd7\x4a\x1e\x40\xae\xb5\x74\x30\xda\xb2\xbb\x27\xcb\x8a\xa6\x38\x46\xd7\x63\xd4\x35\x1a\x73\x04\x6c\x1a\x40\xc8\x07\x59\xe6\x64\xca\x35\xe4\x16\x4d\xa0\x84\x1e\xb1\x0a\xfa\x0b\x43\x07\x8a\x29\x90\x22\x56\xc0\x6b\x8c\x32\x05\xc8\x0a\xc8\x9b\x04\xa0\x6d\x43\x36\xd6\x1d\xfa\x25\x46\x5a\x4d\x29\x85\xf7\xb0\x8e\xe4\x57\x40\x60\x02\x69\x5d\x25\x08\x64\xb1\x32\x39\x73\xc9\x53\x32\xff\x95\x8b\xd1\xf5\x53\x5a\xa4\x46\x47\xe7\xe1\xd0\x71\xda\xe8\x29\x04\xdc\x71\xde\xf4\x04\x83\xd7\x36\x52\x53\x9e\x62\x39\x3d\xe0\x0f\x85\xb2\xbc\xf3\x15\x28\xa6\x2d\x1e\x87\x33\x52\xa6\x35\x31\x9a\xa4\x9b\xd1\x7b\xb2\x11\xaa\xb1\x6d\xc9\x97\x4f\x13\x07\xc7\x6e\x16\x96\x5c\xfd\x42\x9c\xf8\xa1\x58\xb2\xa2\x0b\x63\xb2\x5b\x36\x34\x90\x6d\x18\xcc\xd9\x93\x06\xe2\x5f\x1d\xee\x39\x47\x92\x4d\xd4\xed\xac\xf3\x54\x63\x60\x75\x07\xf2\xad\xf3\x3d\xf0\xe7\x9d\xb6\x81\x6c\xd0\x51\xef\x39\xd4\xd1\xd7\x1d\x85\xb5\x57\xb7\x6d\x7a\x76\x38\xda\x88\x9f\xd5\x16\xe2\xe8\x6d\x80\xf4\xc9\xd2\x9d\x07\xd7\xb6\xcf\x10\xc6\x4e\x14\x5d\x18\xb0\xa6\xa0\xb6\x1c\x0e\x90\x3e\x40\xdb\x10\x39\xb2\xd9\x6e\x58\x3d\x2b\x9e\x29\x48\x6e\xa3\xb6\x6c\x59\x0b\xb5\x27\x14\x3a\xc5\xb1\x93\x3b\xe4\xbc\x07\x01\xfb\x73\x2f\xcb\xd5\x8c\x99\x1e\x3c\xed\xb5\x1b\x83\xdc\x78\x46\xed\x7a\xf4\xc1\xf9\x1c\x59\xa7\x00\x9d\x5d\xef\x94\xcb\xd3\x41\xb6\x6a\xaa\xbf\x08\x8d\x66\xab\x93\xcd\xf9\x9d\xa5\xbe\x3c\x15\x21\x3e\xd8\x50\xab\x2d\x35\x9c\x09\x2f\x8b\x13\xdb\x90\x5d\x75\x0c\xda\xee\x6e\x9f\xd1\xcf\x8f\x86\x38\x26\xa6\x9c\x24\x4a\xd9\xb1\xaf\xc8\xaf\x32\x99\xaf\x85\x88\x71\x0c\xf9\x59\xd3\x5d\xe1\x4c\x36\x9e\x09\xab\x50\x7b\x62\xb7\xfa\x7d\x68\xdc\x53\x22\x43\x6d\xc1\x53\xcf\x85\x67\x0a\xc3\x05\x51\x07\x0c\x60\x30\x44\x88\xba\xa7\xd9\x79\x79\x99\xfd\x96\x5b\x01\x2b\x89\x74\x18\x23\x67\xde\x28\x00\x62\x73\x26\x87\xcf\xcc\xb7\x70\x87\x7a\x55\xa7\x93\xdf\xe2\x9e\x46\xdb\xb8\xc9\x6d\xe2\x79\xd8\x3b\xbb\x01\xde\xe6\xdf\x7c\xb4\x01\xda\x93\x05\x6c\x23\xf9\xd4\x5d\x18\x17\x08\x50\xa4\xb1\x52\xc1\x4d\x99\x3c\xef\xd8\x06\x3c\x89\x52\xe9\xd0\xe6\xd4\x94\x7c\x22\x1a\x04\x5c\xdb\xdd\xb3\x2a\xd6\xde\x19\xd3\xa3\xdf\x69\xae\x42\xd8\xbb\xd1\x46\x66\x9d\x6d\x11\x52\xd5\x70\xa3\x69\xc0\xe8\x4f\x92\x77\x03\x49\x21\xdc\x27\xe9\x15\x19\x77\x58\x10\xbc\x22\xea\x4f\x4b\x41\x61\x20\x6a\x56\xe4\x30\xb0\x1c\x90\x2c\xe6\x2c\x4d\x9f\xcc\x48\x5c\x41\xfd\x36\xa3\xba\x36\x1e\x3c\x0e\x9c\x10\x3b\xd1\x33\xd7\x21\x8f\xc3\x04\xcd\xb1\x22\x0d\x9c\x73\x60\x9c\xdd\xb1\xb0\x56\xc7\x29\x7b\x4d\xae\xb5\x92\x08\xcf\x53\x00\x9b\xe8\xbc\xd0\xf1\x4a\x72\x56\x49\xb5\xac\xac\x3f\xc2\x77\x10\xa8\x76\xb6\x09\xe7\xb9\x53\x12\x7f\x6a\x45\xd0\x84\xd5\x52\x29\x78\x4c\xeb\x7f\x46\xae\xfa\x93\xd7\xd1\x67\x9d\xba\x15\x6e\x3f\x30\x7c\xd2\x76\x27\x60\x7f\xe6\x7e\xc9\x4b\x81\x97\xb3\x12\xb6\xc9\xc9\x5a\xc2\x38\x7a\x9a\x3b\x32\xc6\xe9\x25\x89\x60\x5d\x6b\x49\x4e\xb3\xc4\xe4\x3b\x0c\xe9\xf6\xe4\x0f\x5e\x4b\x6e\x3b\x30\x71\x87\x94\xbd\x3c\x41\x45\xad\xf3\xab\x45\xfb\xc4\xd2\x60\xc6\x9d\xb6\x75\x87\xd6\x92\xe1\x7c\x5b\x3b\x1b\x51\xdb\x70\x6a\xe1\xa6\xbd\x53\x17\x95\xae\x40\x8f\x16\x77\x1c\xb0\x42\xab\x94\x04\x56\x87\x9d\x21\x9d\xe0\x84\x5d\xc2\xc3\x04\x20\x21\xa3\xfb\x81\xfb\x0b\x30\x3a\x88\x2b\xdd\x78\x1a\x5c\xe0\xfa\x7b\xbc\x81\x7f\x07\x67\x73\xc7\x78\xe8\x74\xdd\x4d\xba\x30\x6c\x4f\x11\x1b\x8c\x98\x3b\x3a\x56\x6c\xa7\x39\xf4\x92\xac\x12\x7e\xa2\x64\x57\xf5\x63\x52\xef\x7d\x52\x4f\xb1\x65\x25\x7a\x73\x5a\xca\x2f\x7e\xd2\xf0\xb1\xde\xd2\x32\x72\xfb\xe0\x7b\xa9\x03\xe5\xba\x8b\x75\x31\x0e\x61\x7b\x7f\xbf\xd3\xb1\x1b\xab\xb2\x76\x7d\x6a\x67\xef\x52\x27\x71\x9f\x24\xdc\xe5\x77\x2f\x79\x96\xd7\xae\x91\x3c\xf3\xa0\x29\xdc\xfc\x01\xaa\x59\x5f\x49\x7a\x67\x54\xcf\x6c\xb2\x88\xa0\x43\x0c\xfc\x6e\x04\xc5\x3b\x25\x13\xac\x72\xfa\x5c\x12\x1c\x66\x7a\x99\x06\x94\xc4\xa5\xed\xce\xd0\x44\xef\x3a\x11\xdc\x70\xdd\xdd\xdd\x15\xc5\xdb\xbc\x91\xf5\xcd\x33\xd7\xf6\x14\x87\x92\xfb\xd4\x16\x1e\xce\x62\x27\x65\x44\xf5\xdb\x57\x05\xea\xe5\xad\x02\xf5\xcf\x7f\x29\x50\xd7\xd7\x0a\xd4\xcd\x8d\x2a\xe1\x47\xef\xf6\xba\x99\xeb\xde\x02\x2a\x4b\x7a\xa6\xba\x18\x6e\xdd\xfc\x13\x99\xbc\x3c\x65\xf6\x5c\x13\xa6\x54\xbe\x22\x30\x83\xfc\x1f\x69\x0f\xf6\x38\x95\x08\x8e\x59\x6e\xb8\xf2\x70\x31\xb5\x96\xb9\x31\x4b\x15\x63\xd1\x4f\x43\x71\x39\x11\xe5\xa6\x2f\x88\xad\x20\xb8\x0d\x43\x51\xdb\x52\x1d\xa5\x52\x5c\x0e\xf0\xc9\x98\x19\xbf\x90\x26\x87\x67\x30\x27\xd5\xa8\x84\x77\x52\x7b\x6e\xe6\x5a\x10\xf1\x13\xad\xe1\xc8\x64\xc5\xda\x47\x07\x68\x1d\xe7\x8f\xa2\xc7\xba\xd3\x96\x36\x53\xd8\xd6\x6e\xc8\xb5\xff\x4c\xc9\xfc\x1e\xb9\x03\xf9\x4e\x59\x14\x2f\xe0\x31\xb5\xc8\x9c\x1d\x53\xff\x3a\xdd\x2b\x8a\x5f\xe6\x41\x9c\x2f\x87\x19\x13\x48\x0b\x50\xea\xaf\xcd\x91\x1b\x46\xb9\x6d\x8e\x25\xfc\x3d\xfd\x80\x9e\x70\x1a\xe9\x17\xfa\x14\x07\x67\x6f\xe2\x19\xd1\x97\xff\x1f\x9c\xf3\xab\x44\x37\x81\x99\x46\x36\x6e\xb1\xd3\x38\xcb\x46\x2c\xd6\x9a\xf3\x9f\x72\x5f\x8e\x93\xa3\xcf\xba\xea\xb0\x1c\xd7\xd3\x34\x9e\x83\x36\x2e\xfe\x8d\x28\xb8\xed\x63\x93\x09\x62\x28\x8b\xe2\xe3\x3c\x89\xa6\x3f\x23\x16\x3d\xc7\x62\xd2\xd8\x64\x85\x69\x31\x57\x2c\x4e\xce\x53\x42\x09\x1f\x5d\xc1\x42\x67\x25\x33\x89\x1b\xe9\x7a\x55\xa0\x28\x0b\x6a\xd9\x55\xf3\x2a\x0f\x33\xef\xf2\x68\x7c\x41\xd6\x69\x68\x60\xcb\x49\x41\xe4\x96\x8b\xa5\x4c\x7f\xb2\x64\x19\x1c\x3f\x69\xc6\x3d\xa6\x8e\x9b\x9f\x50\xa6\xff\x65\x74\x60\x9d\xf2\xa4\x9a\xd3\x50\x87\xe1\xa2\xef\xe7\x4a\x2f\xa9\x88\xdb\x0b\xa9\x08\xf4\xb9\xa6\x21\xc2\xa3\x4b\xdf\xc2\x44\x71\x9a\x38\xe1\xcd\xfa\xf1\x7f\x8c\xd5\x31\xad\x6c\x8b\x42\x29\xc5\x0f\x29\x7e\x93\x64\x76\xfd\xaa\xdc\xb9\xeb\x2d\xa4\x2f\x59\x59\xaa\x70\xbd\x05\x99\x6c\x65\xf7\xeb\x66\xba\xe2\xab\xa7\x57\xf4\x17\xba\xde\xc2\xb7\x67\x27\x2f\xa0\xa2\x1f\x69\xb1\x93\x6e\xbc\x29\xbe\xb2\x4e\x45\xf1\x10\x16\xff\x4c\x11\xfb\xa2\x0e\xd2\x50\x10\x10\x86\x63\xea\xe1\x9e\xb2\x3c\x35\x0f\xeb\x96\x2a\x8b\xff\x05\x00\x00\xff\xff\x66\x49\x3b\xe8\x15\x14\x00\x00") +var _runtimeHelpOptionsMd = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x58\x5f\x8f\xdc\xb6\x11\x7f\x3e\x7d\x8a\xc1\x39\xc0\xdd\x19\x7b\x3a\x23\xf5\x43\xb0\x2f\xc5\xb5\x6e\x2f\x06\xea\x38\x48\xfc\x90\xa0\x28\x42\x4a\x1a\x49\xac\x29\x52\x25\xa9\x5d\xaf\x03\xf7\xb3\x17\x33\x24\x57\xda\x3d\xdd\xd5\x79\xdb\xe5\x9f\xdf\x0c\x7f\xf3\x5f\x2f\x5e\xbc\x80\xf7\x63\x50\xd6\xf8\xa2\x78\xa7\x6a\x67\xc1\x07\xeb\xd0\x83\xd4\x1a\x6c\x0b\xa1\x47\x98\x3c\x3a\xa8\xad\x69\x55\x37\x39\x49\x87\x41\x19\x50\xc1\x9f\x2d\x36\xca\x61\x1d\xac\x3b\x94\x19\x6b\xf2\xe8\x19\x42\x7c\xf3\xcb\x9b\x87\xdf\xfe\xfa\xfe\x87\xbf\xbf\x7d\xf8\xed\xfb\xf7\xef\xfe\x76\x37\xd0\x01\x01\x32\xee\x3f\x05\x04\xf7\x1e\x46\x74\x05\x9d\xf9\xe5\xcd\x03\xf8\x11\xeb\x0d\xa8\xf6\x31\xa0\x00\xe5\xc1\xd8\x00\x1e\xc3\x06\xc4\x7f\xef\xca\x88\x99\x05\x29\x4f\xda\x34\x24\xb0\x98\x25\x9e\xe8\xfc\x3d\x3a\x04\xe9\x90\x35\xb2\x91\x15\x08\xbd\x0c\x70\xb0\x13\xd4\xd2\x10\xf6\xb6\x28\x5e\x82\xa8\xad\xb6\xce\xd7\x3d\x0e\x28\xb6\xa0\xad\x6c\xf2\x3b\x8e\xeb\x91\xc8\x86\xa8\x2a\x00\xe0\x9b\xeb\x28\xf1\x8d\x72\x37\x77\x8b\x63\xfe\x4e\x44\x51\xa2\x64\x4d\xe9\xec\x87\x5e\x79\x92\x15\x94\xe9\x48\x71\xd1\x69\x5b\x49\x0d\xd6\xe8\x83\x28\x8b\xe2\xa2\xc1\x56\x4e\x3a\xc0\x4e\xea\x09\xb7\x20\xd2\x7f\x51\x5c\xfc\x60\x03\x46\x9d\x49\x9d\x7c\x6e\x29\x0f\xae\xd3\xea\x06\xbc\xd5\xd2\xa9\xcf\xd8\x6c\x40\x9a\x66\xfe\x7b\x1b\xea\x9b\xe2\x82\x98\x20\x42\xb5\xad\x65\x88\x0f\x39\x3e\x61\x03\x15\xd6\x72\xf2\xcc\xd5\x81\x49\xc3\xa1\xc2\xa6\x89\xe7\x48\x36\xbf\x06\x2a\x65\x24\x93\x7b\xf1\xe1\x8c\x1e\xe2\xb3\x42\xf0\xa8\xb1\x26\xf8\xd6\xd9\x81\xbd\x8e\x2e\xb7\x4a\xa3\xcf\x48\xc5\xc5\x99\x35\x4f\xf9\x5b\xba\x4b\x74\xbb\xda\xd2\x3b\xab\xc3\xf1\xfd\x7b\x15\x7a\x08\xbd\x43\x2c\x2e\x96\x77\xb7\x05\xd1\x0d\xbf\x26\xf3\x3a\x94\x0d\x0c\x96\xbc\xa0\xb2\x53\x88\x4f\xb8\xf2\xa7\xf4\x25\xa5\x92\x0b\x08\xe8\x51\x8f\x10\xec\xa8\x6a\xc6\xba\x16\xbc\x90\x76\x6f\xca\xd9\x5d\x6a\xab\xa7\xc1\x88\x2d\xb9\x6f\x20\x0b\xcf\x0e\x0b\xc1\xc2\xab\x0d\x28\xd2\x54\x6b\x68\x94\x1f\xb5\x3c\x80\x84\x78\x07\x92\x39\xc9\xfb\x55\xab\xb0\x21\x49\x71\xab\x8c\xce\x12\xbd\xbb\x9d\x34\x81\x93\xb7\xee\xa5\x09\xf9\xf6\x77\xaf\x08\xbf\x42\xe8\x55\xd7\x6b\xd5\xf5\x44\x37\x63\x49\x0d\xad\x75\x80\x9f\xe4\x30\x6a\x5c\xf3\xac\x57\x82\x1f\x80\xb6\x35\xb8\xd7\xca\x90\xbb\x47\xcb\xb2\xa6\x72\x0a\x76\x90\x41\xd5\x52\xeb\x03\xc8\xa6\x01\x09\xe9\x20\xc9\xcc\xa6\x5c\x43\x6e\xa5\xf6\x18\xd1\x83\xac\xbc\xfa\x4c\xd0\x1e\x43\x0c\xa4\x20\x2b\xa0\x35\x42\xc9\x01\xb2\x02\xf2\x3a\x02\x28\xd3\xa0\x09\x75\x2f\xdd\x12\x23\xae\xc6\x94\x42\x7b\xb2\x0e\xe8\x56\x40\x20\x83\xb4\xb6\x62\x04\x34\xb2\xd2\x29\x73\xf1\x53\x12\xff\x95\x0d\xc1\x0e\x39\x2d\x62\xa3\x82\x75\xb0\xef\x29\x6d\x0c\xe8\xbd\xec\x28\x6f\x3a\x84\xd1\x29\x13\xb0\x29\x8f\xb1\x1c\x1f\xf0\x55\xa1\xcc\xef\x7c\x09\x82\x68\x0b\x87\xf1\x84\x94\xbc\xc6\x46\xe3\x74\x33\x39\x87\x26\x40\x35\xb5\x2d\xba\xf2\x71\xe2\xa0\xd8\x4d\xc2\xa2\xab\x9f\x89\x63\x3f\x64\x4b\x56\x78\x66\x4c\x72\xcb\x06\x47\x34\x0d\x81\x59\x73\xd4\x80\xfd\xab\x97\x3b\xca\x91\x68\x22\x75\x9d\xb1\x0e\x6b\xe9\x49\xdd\x11\x5d\x6b\xdd\x00\xf4\xf7\x56\x19\x8f\xc6\xab\xa0\x76\x14\xea\xd2\xd5\x3d\xfa\xb5\x57\xb7\x6d\x7c\xb6\x3f\x98\x20\x3f\x89\x2d\x84\xc9\x19\x0f\xf1\x2f\x49\xb7\x0e\x6c\xdb\x3e\x43\x18\x39\x51\xb0\x7e\x94\x35\x7a\xb1\xa5\x70\x80\xf8\x07\x94\xf1\x81\x22\x9b\xec\x26\xab\x67\xc5\x13\x05\xd1\x6d\xc4\x96\x2c\x6b\xa0\x76\x28\x99\x4e\x76\xec\xe8\x0e\x29\xef\x81\x97\xc3\xa9\x97\xa5\x6a\x46\x4c\x8f\x0e\x77\xca\x4e\x9e\x6f\x3c\xa3\x76\x3d\x39\x6f\x5d\x8a\xac\x63\x80\xce\xae\x77\xcc\xe5\xf1\x20\x59\x35\xd6\x5f\x09\x8d\x22\xab\xa3\x49\xf9\x9d\xa4\x5e\x1f\x8b\x10\x1d\x6c\xb0\x55\x06\x1b\xca\x84\xe7\xc5\x89\x6c\x48\xae\x3a\x79\x65\xba\x9b\x67\xf4\x73\x93\x46\x8a\x89\x9c\x93\x58\x29\x33\x0d\x15\xba\x55\x26\xd3\x35\x1f\x64\x98\x7c\x7a\x56\xbe\xcb\x9c\xf1\xc6\x33\x61\xe5\x6b\x87\xe4\x56\x4f\x43\xcb\x1d\x46\x32\xc4\x16\x1c\x0e\x54\x78\x72\x18\x2e\x88\xda\x4b\x0f\x5a\xfa\x00\x41\x0d\x38\x3b\x2f\x2d\x93\xdf\x52\x2b\x60\x38\x91\x8e\x53\xa0\xcc\x1b\x18\x80\x6d\x4e\xe4\xd0\x99\xf9\x96\xec\xa4\x5a\xd5\xe9\xe8\xb7\x72\x87\x93\x69\x6c\x76\x9b\x70\x1a\xf6\xd6\x6c\x80\xb6\xe9\x37\x1d\x6d\x00\x77\x68\x40\xb6\x01\x5d\xec\x2e\xb4\xf5\x08\x92\xa5\x91\x52\xde\xe6\x4c\x9e\x76\x4c\x03\x0e\x59\xa9\x78\x68\x73\x6c\x4a\x3e\x22\x8e\x0c\xae\x4c\xf7\xac\x8a\xb5\xb3\x5a\x0f\xd2\x75\x8a\xaa\x90\x1c\xec\x64\x02\xb1\x4e\xb6\xf0\xb1\x6a\xd8\x49\x37\xa0\xd5\x47\xce\xbb\x1e\xb9\x10\xee\xa2\xf4\x0a\xb5\xdd\x2f\x08\x5e\x11\xf5\xa7\xa5\x20\x3f\x22\x36\x2b\x72\x08\x98\x0f\x70\x16\xb3\x06\xf3\x5f\x62\x24\xac\xa0\x7e\x9b\x50\x6d\x1b\xf6\x4e\x8e\x94\x10\x7b\xd6\x33\xd5\x21\x27\xc7\x0c\x4d\xb1\xc2\x0d\x9c\xb5\xa0\xad\xe9\x48\x58\xab\x42\xce\x5e\xd9\xb5\x56\x12\xe1\x82\xa6\x51\xab\xf0\x13\x05\x61\xb6\xa5\x84\x1d\x3a\x4e\x8b\xc0\x9b\x64\x44\x4e\x0b\xd4\x38\x25\x5d\x54\xa0\x0c\x9a\x56\x73\xe9\x73\x1c\xca\xb6\x25\x81\xcb\x74\xcd\x28\x7f\x7e\x42\x0f\xf3\xb4\x1a\xbd\x75\xea\xb3\x35\xe1\xeb\x15\x39\x1a\x8d\x3b\x86\x3f\x20\x9e\x12\x21\x39\xea\x69\xb9\xa7\x95\x18\xb2\x5c\x70\xc8\x64\xee\x00\xdf\x81\xc7\xda\x9a\xc6\x9f\x56\x10\x2e\x7f\xb1\x21\x93\xda\xaf\x36\x0c\x8c\x47\xce\xf5\x9f\x89\x7a\x9f\x1c\x7b\xf8\x49\xc5\x9e\x8d\x9a\x30\xe9\x3f\x2a\xd3\x31\xd8\x5f\xa8\x6b\x74\xdc\xe6\xf0\x59\x4e\x5e\x31\xd4\x5a\x94\x61\x72\x38\xf7\xa5\x84\x33\x30\xff\xb2\xae\x15\xa7\xe8\x59\x62\x8c\x20\x82\xb4\x3b\x74\x7b\xa7\x38\xc3\xef\xc9\x7d\xf6\x31\x87\x3b\x84\x0a\x5b\xeb\x56\x5b\x97\xa3\xaf\x8c\x7a\xea\x94\xa9\x7b\x69\x0c\x6a\xaa\x3a\x35\x59\x47\x19\x7f\x6c\x64\xf3\xde\xb1\x97\x8c\x57\x60\x90\x46\x76\x94\xb6\x98\x56\x2e\x8c\xa4\x0e\x85\x44\x3c\x41\x65\xab\x84\xfb\x0c\xc0\x89\x43\x0d\x23\x75\x59\xa0\x95\xe7\x80\xba\x72\x38\x5a\x4f\x5d\xc8\xe1\x0a\xfe\xed\xad\x49\x7d\xf3\xbe\x57\x75\x9f\x75\x21\xd8\x01\x83\x6c\x64\x90\xa9\xaf\x25\xc5\x3a\x45\x09\x28\xca\x2a\xe1\x67\x8c\x76\x15\x3f\x46\xf5\xde\x45\xf5\x04\x59\x96\x73\x58\x4a\xce\xe9\xc5\x8f\xda\x5e\xd2\x9b\x1b\x67\x6a\xa2\xdc\xc0\xd5\xb0\x5c\xf7\xb0\x3e\x84\xd1\x6f\xef\xee\x3a\x15\xfa\xa9\x2a\x6b\x3b\xc4\xa6\xfe\x36\xf6\x53\x77\x51\xc2\x6d\x7a\xf7\x92\x67\x7e\xed\x1a\xc9\x33\x0f\x0a\xfd\xd5\x57\x50\x4d\xfa\x72\xea\x3f\xa1\x7a\x66\x93\x44\x78\xe5\x83\xa7\x77\x4b\x10\xb4\x53\x12\xc1\x22\x15\x91\x25\xc1\x7e\xa6\x97\x68\x90\x9c\xbe\x95\xe9\x34\x66\x7a\xd7\x89\xa0\xb6\xf3\xf6\xf6\xb6\x28\xde\xa4\x8d\xa4\x6f\x9a\x3c\xb7\xc7\x38\xe4\x0a\x20\xb6\x70\x7f\x12\x3b\xb1\x2e\x88\xdf\xbf\x08\x10\xd7\x37\x02\xc4\x3f\xff\x25\x40\x5c\x5e\x0a\x10\x57\x57\xa2\x84\x1f\x9d\xdd\xa9\x66\xae\xfe\x0b\xa8\x24\xe9\x99\x1a\xab\xa9\x81\x75\x8f\x64\xd2\x72\xae\x6f\xa9\x32\xe6\x82\xb6\x22\x30\x81\xfc\x1f\x69\xf7\xe6\x90\x0b\x25\xc5\x2c\xb5\x9d\x69\xc4\xca\x0d\x76\x6a\x4f\x63\xdd\x5c\x4c\x15\x50\x9c\xcf\x85\xa9\xf5\xf5\x6c\x2b\xf0\x76\x43\x50\xd8\xb6\x58\x07\xae\x97\xe7\x9f\x31\xa2\x31\x13\x7e\x91\x93\x26\x59\xf1\x60\xa7\x12\xde\x72\x05\xbe\x9a\x2b\x62\x90\x1f\x71\x0d\x87\xe7\x4b\xd2\x3e\x58\x90\xc6\x52\xfe\x28\x06\x59\xf7\xca\xe0\x26\x87\x6d\x6d\xc7\xd4\x01\x9d\x28\x99\xde\xc3\x77\x20\xdd\x29\x8b\xe2\x05\x3c\xc4\x41\x81\xb2\x63\xec\xe2\xf3\xbd\xa2\xf8\x75\xfe\x1c\x41\x97\xfd\x8c\x09\xa8\x18\x28\x4e\x19\xfa\x40\x6d\x33\xdf\xd6\x87\x12\xfe\x11\x7f\xc0\x80\x32\x7f\xd8\x58\xe8\x53\xec\xad\xb9\x0a\x27\x44\x9f\x7f\x45\x39\xe5\x57\xb0\x6e\x0c\x93\x07\x57\x1a\x34\xe2\x50\x4f\x46\x2c\xd6\x46\x94\x9f\xd3\x74\x22\xb3\xa3\xcf\xba\x2a\xbf\xfc\x68\x11\xbf\x49\xa4\xa0\x0d\x8b\x6f\x32\x05\x35\xbf\x64\x32\x46\xf4\x65\x51\x7c\x98\xe7\xf1\xf8\x49\x66\xd1\x79\x2d\xe6\xad\x4d\x52\x18\x17\xd3\xd5\xe2\xe4\x3c\x2b\x95\xf0\xc1\x16\x24\x74\x56\x32\x91\xb8\xe1\xde\x5f\x78\x0c\xbc\x20\x96\xb3\x05\xad\xd2\x48\xf7\x36\x7d\x20\x38\x23\xeb\x38\x3a\x91\xe5\xb8\x20\x52\xe3\x49\x52\xf2\xa7\xa6\x24\x83\xe2\x27\x4e\xfa\x87\x38\x77\xd0\x13\xca\xf8\x75\x4a\x79\xd2\x29\xcd\xeb\x29\x0d\xf5\xd2\x9f\x4d\x3f\xd4\xef\x70\x2a\xa2\x26\x8b\x2b\x02\x7e\xaa\x71\x0c\xf0\x60\xe3\x7f\x66\xa2\x38\xce\xdd\xf0\x7a\xfd\xf8\x4f\x53\x75\x88\x2b\xdb\xa2\x10\x42\xd0\x43\x8a\xdf\x39\x99\x5d\xbe\x2c\x3b\x7b\xb9\x85\xf8\x8f\x57\x96\x2a\x5c\x6e\x81\xe7\x7b\xde\xfd\xb2\xc9\x57\x5c\xf5\xf8\x8a\xfa\x8c\x97\x5b\xf8\xf6\xe4\xe4\x19\x54\x70\x13\x2e\x76\xe2\x8d\xd7\xc5\x17\xd2\xa9\x28\xee\xfd\xe2\xfb\x1c\x42\x6c\x8b\xa8\xa1\x40\x40\xe9\x0f\xb1\x93\x7d\xcc\x72\x6e\x1e\xd6\x2d\x55\x16\xff\x0b\x00\x00\xff\xff\x38\x6d\x9b\xc0\x1b\x15\x00\x00") func runtimeHelpOptionsMdBytes() ([]byte, error) { return bindataRead( @@ -1924,6 +1925,26 @@ func runtimeSyntaxPoMicro() (*asset, error) { return a, nil } +var _runtimeSyntaxPonyMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x93\x4f\x73\x9b\x3c\x10\xc6\xef\xf9\x14\x44\x93\xf7\x35\x90\x62\xbb\xa7\x4e\x32\x26\x9e\xcc\xb4\xbd\xe6\xd2\x53\x10\xf1\x08\xb1\xc4\x6a\x41\xf2\x48\x8b\xff\x74\x9e\x0f\xdf\xc1\x21\x9d\x34\xb5\x7b\x42\xda\xfd\xed\xc3\xf2\xec\x12\x0e\x96\xd5\x3e\x12\x1b\x67\x0f\x22\x12\x72\x3a\x1c\xae\xc4\xc5\x85\x76\xad\xf3\x51\x60\xc5\xd4\x91\xe5\x48\xc8\x2a\xe6\xc3\x86\x60\x2c\x93\x6f\x94\x26\xb0\x57\x86\xb1\xf1\xa6\x33\x6c\xb6\x04\xdd\xaa\x10\x10\xd8\xf7\x9a\xa1\x34\x3b\x9f\xc8\x4a\x9c\x54\xd2\xae\xdb\x98\x96\xfc\xca\x58\xf6\xc6\x06\xa3\xcf\xa2\x7d\xa0\xb3\xb9\xad\xf2\x68\x89\x41\x5d\x45\xf5\x59\xca\xd2\x0e\x15\xa1\xe9\xed\x59\xc4\x04\x07\xf6\x16\x9e\x1a\x6c\x55\x8b\xca\xed\xc1\xea\x19\xda\xd9\xd0\x77\xe7\x1b\xa8\x3c\xa9\x1f\x03\xc5\xc6\xf6\x04\x4f\xdc\x7b\x0b\xf2\xfe\x1f\xdf\x6e\x1a\xf0\x9a\x2c\xa8\x0d\x64\x9a\xe3\x03\x64\x6b\x74\x8a\xf5\x1a\xbb\x35\xf9\xc1\xda\x03\x76\x86\xd7\x50\x01\x9e\xb4\xdb\x92\x87\xab\xbe\x93\x66\xb4\xaa\xab\x6a\x35\x24\x6a\xf3\x4c\x81\x5d\x03\xd3\xd4\xd4\x9c\x7d\xdf\x6e\x6d\x5a\x42\xed\xe0\x69\x43\x8a\xd1\x5b\x36\x2d\x1a\xe7\x61\x5e\x0c\xf9\xbb\x2a\x96\x4b\xe4\x77\xc9\x09\xbd\x58\x4a\x40\xca\xff\x21\xe5\x07\x48\xf9\x94\x9c\x2e\xcf\x20\xaf\x21\x65\x8a\x19\xe4\x25\xfe\xc3\x62\x81\xbb\xd3\x7a\x79\x8e\xcb\x1c\x8b\x1c\x77\x39\x16\x38\xc9\x1c\xe7\x03\x13\x2c\xc3\x3a\x86\xb2\x35\x9c\xc7\x7e\xb4\x78\xe4\x87\xdd\x3c\xa2\xab\xb4\xb8\xcf\x1e\xcb\x62\xa5\xb2\x9f\xf7\xd9\xe3\x3c\xbb\x91\x72\x52\xa6\x6f\xd9\x61\xaa\xac\x5e\x97\x7a\x6d\xc2\x1b\xef\xfe\xcc\xf9\x9e\xd0\xa8\x76\x5c\xc1\x77\xc8\xd4\xf6\x5d\x45\xfe\x48\xc6\xf3\xaa\x98\x67\x1f\x57\x65\x9a\x20\x9e\xbb\x62\x9e\x7d\x1a\xcf\xfb\x62\x9e\xdd\xa8\xac\xb9\xcf\xbe\xbe\x44\x86\xfb\xaa\xbc\x8e\xa5\x9c\x8e\xc7\x64\x19\xc7\x84\x2f\x49\x2c\xe5\x35\xb2\x64\xf9\x3b\x9c\x9c\x68\x6c\x1a\x86\x3f\xe6\x39\x12\xc3\x2c\xa6\x28\x9e\x44\x99\xa4\x02\x93\xf1\x36\x29\x93\x74\xf2\xa6\xd5\xee\xe8\x61\x60\xe5\x39\x17\x42\x88\x78\x28\xc0\x55\x22\x22\xb2\xf5\x31\x22\xde\xb1\x22\x7e\x42\x51\xdc\x86\x8d\xd2\x74\x5b\x96\xc9\x6c\x36\x4d\xdf\x33\xa3\xde\x4c\xa6\xa3\x8e\x4c\x67\xaf\x0c\xbb\xda\x45\xe2\xdb\xc3\xe7\x87\xdb\xa5\xb8\xf8\x15\x00\x00\xff\xff\xe7\x85\xf0\x1d\x61\x04\x00\x00") + +func runtimeSyntaxPonyMicroBytes() ([]byte, error) { + return bindataRead( + _runtimeSyntaxPonyMicro, + "runtime/syntax/pony.micro", + ) +} + +func runtimeSyntaxPonyMicro() (*asset, error) { + bytes, err := runtimeSyntaxPonyMicroBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "runtime/syntax/pony.micro", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _runtimeSyntaxPovMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x91\x41\x6f\xdb\x30\x0c\x85\xef\xf9\x15\x9a\x5c\x0c\x4e\x80\x35\xf7\x2e\x2d\x30\xec\xb2\x5b\x8b\x1e\x0a\x0c\x51\x9a\xd1\x32\x2d\x6b\x93\x45\x81\x92\xb3\x18\xe3\xfe\xfb\x60\xef\xd2\x2e\xe8\x6e\xef\x11\x4f\x8f\x1f\xc4\xaa\x52\x5f\x90\x51\xf9\xac\x20\x2a\x3c\xc3\x90\x02\xaa\x8e\x58\x3d\xdc\x3f\x7d\x78\x84\xe9\x7a\x55\x55\xab\x3c\xc5\x02\x67\xa5\x13\x9d\xb4\xd2\xe6\xba\x4e\x74\x92\x87\xfb\x27\x49\x74\x62\x98\x66\xf9\xf8\xe9\xeb\xfa\x4a\xaf\x2c\x05\x62\xd5\xb0\x77\x7d\xb1\x13\x44\xa5\x9f\xf7\xfb\x9b\x9c\xc0\xe2\xcd\xe1\xb0\xa9\x5e\x9a\xba\x45\x1b\x80\x71\xfd\xfa\xd9\x84\x21\xd0\x4f\xa5\xcd\xae\xce\xa9\x47\x46\xb1\x53\xf0\xb1\x45\x96\xc2\x10\x73\x80\x82\x32\x40\x61\x7f\x16\xa6\x32\xbb\x6c\x21\xe0\xda\xdc\xbd\x59\x44\x5c\x7a\x72\x0c\xa9\xf7\x56\x02\x59\x28\x9e\xa2\x8c\x49\x96\xa0\xb4\x9e\xd1\x2e\x23\x1b\x7c\x4a\xd8\x1e\x9b\xe9\x7f\x75\x1d\xb9\x63\x99\x12\xca\x2c\xa8\xeb\x32\x96\x45\x42\x28\xc2\xae\x91\xd6\xe7\x02\xd1\xe2\x5f\xe0\x8e\x78\xb8\x68\x63\x6c\x95\x7e\x36\xbb\xba\xe0\xb9\x8c\x7c\x49\xbf\x04\xcc\xae\x0e\xb3\x39\x66\x1a\xd9\xa2\x34\x60\x7f\x38\xa6\x31\xb6\x6f\xe6\x3b\x72\x42\xcd\x77\xb4\x45\x2c\x0c\xc8\xf0\x22\xe9\x18\x31\x2a\x5d\x9b\x5f\x62\x7e\x8b\xa9\xc5\xac\xc5\x7c\x14\x73\x10\xb3\x97\x6f\x62\x8c\x98\x2b\xd9\xc9\x9d\xbc\x93\x5b\x79\x2f\x46\xfe\x39\xcd\x00\x0e\x63\x81\x65\xcf\x18\xe7\xff\x9a\x61\x92\xe4\xb1\x59\xc4\xb2\xaa\xaa\xd4\x67\x1a\x06\x8c\x45\xf5\xde\xf5\x0b\xbf\x8f\xee\x55\x51\x13\x46\x54\x7a\xbb\xbd\xde\xe8\xcb\x79\x2e\xc0\xe5\x56\x6f\xcd\x46\x2b\x8c\xed\xad\x36\x9b\xad\x5e\xfd\x09\x00\x00\xff\xff\x5f\xb8\x0d\xe0\xaa\x02\x00\x00") func runtimeSyntaxPovMicroBytes() ([]byte, error) { @@ -2663,6 +2684,7 @@ var _bindata = map[string]func() (*asset, error){ "runtime/syntax/php.micro": runtimeSyntaxPhpMicro, "runtime/syntax/pkg-config.micro": runtimeSyntaxPkgConfigMicro, "runtime/syntax/po.micro": runtimeSyntaxPoMicro, + "runtime/syntax/pony.micro": runtimeSyntaxPonyMicro, "runtime/syntax/pov.micro": runtimeSyntaxPovMicro, "runtime/syntax/privoxy-action.micro": runtimeSyntaxPrivoxyActionMicro, "runtime/syntax/privoxy-config.micro": runtimeSyntaxPrivoxyConfigMicro, @@ -2836,6 +2858,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ "php.micro": &bintree{runtimeSyntaxPhpMicro, map[string]*bintree{}}, "pkg-config.micro": &bintree{runtimeSyntaxPkgConfigMicro, map[string]*bintree{}}, "po.micro": &bintree{runtimeSyntaxPoMicro, map[string]*bintree{}}, + "pony.micro": &bintree{runtimeSyntaxPonyMicro, map[string]*bintree{}}, "pov.micro": &bintree{runtimeSyntaxPovMicro, map[string]*bintree{}}, "privoxy-action.micro": &bintree{runtimeSyntaxPrivoxyActionMicro, map[string]*bintree{}}, "privoxy-config.micro": &bintree{runtimeSyntaxPrivoxyConfigMicro, map[string]*bintree{}}, diff --git a/cmd/micro/settings.go b/cmd/micro/settings.go index 2266099b..648858c3 100644 --- a/cmd/micro/settings.go +++ b/cmd/micro/settings.go @@ -190,6 +190,8 @@ func DefaultGlobalSettings() map[string]interface{} { "scrollspeed": float64(2), "scrollmargin": float64(3), "softwrap": false, + "splitRight": true, + "splitBottom": true, "statusline": true, "syntax": true, "tabsize": float64(4), @@ -219,6 +221,8 @@ func DefaultLocalSettings() map[string]interface{} { "scrollspeed": float64(2), "scrollmargin": float64(3), "softwrap": false, + "splitRight": true, + "splitBottom": true, "statusline": true, "syntax": true, "tabsize": float64(4), diff --git a/cmd/micro/split_tree.go b/cmd/micro/split_tree.go index 8fd98b26..568edf1b 100644 --- a/cmd/micro/split_tree.go +++ b/cmd/micro/split_tree.go @@ -12,8 +12,8 @@ const ( // A Node on the split tree type Node interface { - VSplit(buf *Buffer) - HSplit(buf *Buffer) + VSplit(buf *Buffer, splitRight bool) + HSplit(buf *Buffer, splitBottom bool) String() string } @@ -52,16 +52,26 @@ type SplitTree struct { } // VSplit creates a vertical split -func (l *LeafNode) VSplit(buf *Buffer) { +func (l *LeafNode) VSplit(buf *Buffer, splitRight bool) { tab := tabs[l.parent.tabNum] if l.parent.kind == VerticalSplit { newView := NewView(buf) newView.TabNum = l.parent.tabNum - newView.Num = len(tab.views) - l.parent.children = append(l.parent.children, NewLeafNode(newView, l.parent)) - tab.curView++ - tab.views = append(tab.views, newView) + i := 0 + if splitRight { + i = 1 + } + + l.parent.children = append(l.parent.children, nil) + copy(l.parent.children[l.view.Num+i+1:], l.parent.children[l.view.Num+i:]) + l.parent.children[l.view.Num+i] = NewLeafNode(newView, l.parent) + + tab.views = append(tab.views, nil) + copy(tab.views[l.view.Num+i+1:], tab.views[l.view.Num+i:]) + tab.views[l.view.Num+i] = newView + + tab.curView = l.view.Num + i } else { s := new(SplitTree) s.kind = VerticalSplit @@ -69,27 +79,47 @@ func (l *LeafNode) VSplit(buf *Buffer) { s.tabNum = l.parent.tabNum newView := NewView(buf) newView.TabNum = l.parent.tabNum - newView.Num = len(tab.views) - s.children = []Node{l, NewLeafNode(newView, s)} + i := 0 + if splitRight { + i = 1 + s.children = []Node{l, NewLeafNode(newView, s)} + } else { + tab.curView = l.view.Num + } l.parent.children[search(l.parent.children, l)] = s l.parent = s - tab.curView++ - tab.views = append(tab.views, newView) + tab.views = append(tab.views, nil) + copy(tab.views[l.view.Num+i+1:], tab.views[l.view.Num+i:]) + tab.views[l.view.Num+i] = newView + + tab.curView = l.view.Num + i } + + tab.Resize() } // HSplit creates a horizontal split -func (l *LeafNode) HSplit(buf *Buffer) { +func (l *LeafNode) HSplit(buf *Buffer, splitBottom bool) { tab := tabs[l.parent.tabNum] if l.parent.kind == HorizontalSplit { newView := NewView(buf) newView.TabNum = l.parent.tabNum - newView.Num = len(tab.views) - l.parent.children = append(l.parent.children, NewLeafNode(newView, l.parent)) - tab.curView++ - tab.views = append(tab.views, newView) + i := 0 + if splitBottom { + i = 1 + } + + l.parent.children = append(l.parent.children, nil) + copy(l.parent.children[l.view.Num+i+1:], l.parent.children[l.view.Num+i:]) + l.parent.children[l.view.Num+i] = NewLeafNode(newView, l.parent) + + tab.views = append(tab.views, nil) + copy(tab.views[l.view.Num+i+1:], tab.views[l.view.Num+i:]) + tab.views[l.view.Num+i] = newView + + tab.curView = l.view.Num + i } else { s := new(SplitTree) s.kind = HorizontalSplit @@ -98,13 +128,24 @@ func (l *LeafNode) HSplit(buf *Buffer) { newView := NewView(buf) newView.TabNum = l.parent.tabNum newView.Num = len(tab.views) - s.children = []Node{l, NewLeafNode(newView, s)} + i := 0 + if splitBottom { + i = 1 + s.children = []Node{l, NewLeafNode(newView, s)} + } else { + s.children = []Node{NewLeafNode(newView, s), l} + } l.parent.children[search(l.parent.children, l)] = s l.parent = s - tab.curView++ - tab.views = append(tab.views, newView) + tab.views = append(tab.views, nil) + copy(tab.views[l.view.Num+i+1:], tab.views[l.view.Num+i:]) + tab.views[l.view.Num+i] = newView + + tab.curView = l.view.Num + i } + + tab.Resize() } // Delete deletes a split @@ -253,10 +294,10 @@ func findView(haystack []*View, needle *View) int { } // VSplit is here just to make SplitTree fit the Node interface -func (s *SplitTree) VSplit(buf *Buffer) {} +func (s *SplitTree) VSplit(buf *Buffer, splitRight bool) {} // HSplit is here just to make SplitTree fit the Node interface -func (s *SplitTree) HSplit(buf *Buffer) {} +func (s *SplitTree) HSplit(buf *Buffer, splitBottom bool) {} func (s *SplitTree) String() string { str := "[" diff --git a/cmd/micro/tab.go b/cmd/micro/tab.go index c981e072..82e49a06 100644 --- a/cmd/micro/tab.go +++ b/cmd/micro/tab.go @@ -64,6 +64,10 @@ func (t *Tab) Resize() { } t.tree.ResizeSplits() + + for i, v := range t.views { + v.Num = i + } } // CurView returns the current view diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 183f6d4e..7351732b 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -274,15 +274,13 @@ func (v *View) ReOpen() { // HSplit opens a horizontal split with the given buffer func (v *View) HSplit(buf *Buffer) bool { - v.splitNode.HSplit(buf) - tabs[v.TabNum].Resize() + v.splitNode.HSplit(buf, v.Buf.Settings["splitRight"].(bool)) return false } // VSplit opens a vertical split with the given buffer func (v *View) VSplit(buf *Buffer) bool { - v.splitNode.VSplit(buf) - tabs[v.TabNum].Resize() + v.splitNode.VSplit(buf, v.Buf.Settings["splitBottom"].(bool)) return false } diff --git a/runtime/help/options.md b/runtime/help/options.md index 9f654202..e643481a 100644 --- a/runtime/help/options.md +++ b/runtime/help/options.md @@ -101,6 +101,16 @@ Here are the options that you can set: default value: `off` +* `splitRight`: when a vertical split is created, should it be created to the right of + the current split? + + default value: `on` + +* `splitRight`: when a horizontal split is created, should it be created below the + current split? + + default value: `on` + * `autosave`: micro will save the buffer every 8 seconds automatically. Micro also will automatically save and quit when you exit without asking. Be careful when using this feature, because you might accidentally save a file,